Java Doc for CharChunk.java in  » Sevlet-Container » tomcat-connectors » org » apache » tomcat » util » buf » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » tomcat connectors » org.apache.tomcat.util.buf 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.tomcat.util.buf.CharChunk

All known Subclasses:   org.apache.coyote.tomcat4.OutputBuffer,
CharChunk
final public class CharChunk implements Cloneable,Serializable(Code)
Utilities to manipluate char chunks. While String is the easiest way to manipulate chars ( search, substrings, etc), it is known to not be the most efficient solution - Strings are designed as imutable and secure objects.
author:
   dac@sun.com
author:
   James Todd [gonzo@sun.com]
author:
   Costin Manolache
author:
   Remy Maucherat

Inner Class :public static interface CharInputChannel
Inner Class :public static interface CharOutputChannel


Constructor Summary
public  CharChunk()
     Creates a new, uninitialized CharChunk object.
public  CharChunk(int size)
    

Method Summary
public  voidallocate(int initial, int limit)
    
public  voidappend(char b)
    
public  voidappend(CharChunk src)
    
public  voidappend(char src, int off, int len)
    
public  voidappend(StringBuffer sb)
    
public  voidappend(String s, int off, int len)
    
public  booleanequals(String s)
     Compares the message bytes to the specified String object.
public  booleanequals(CharChunk cc)
    
public  booleanequals(char b2, int off2, int len2)
    
public  booleanequals(byte b2, int off2, int len2)
    
public  booleanequalsIgnoreCase(String s)
     Compares the message bytes to the specified String object.
public  voidflushBuffer()
    
public  char[]getBuffer()
    
public  char[]getChars()
    
public  CharChunkgetClone()
    
public  intgetEnd()
    
public  intgetInt()
    
public  intgetLength()
     Returns the length of the bytes.
public  intgetLimit()
    
public  intgetOffset()
    
public  intgetStart()
     Returns the start offset of the bytes.
public  inthash()
    
public  inthashIgnoreCase()
    
public  intindexOf(char c)
    
public  intindexOf(char c, int starting)
     Returns true if the message bytes starts with the specified string.
public static  intindexOf(char chars, int off, int cend, char qq)
    
public  intindexOf(String src, int srcOff, int srcLen, int myOff)
    
public  booleanisNull()
    
public  voidrecycle()
     Resets the message bytes to an uninitialized state.
public  voidreset()
    
public  voidsetCharInputChannel(CharInputChannel in)
     When the buffer is empty, read the data from the input channel.
public  voidsetCharOutputChannel(CharOutputChannel out)
     When the buffer is full, write the data to the output channel.
public  voidsetChars(char[] c, int off, int len)
    
public  voidsetEnd(int i)
    
public  voidsetLimit(int limit)
     Maximum amount of data in this buffer.
public  voidsetOffset(int off)
     Returns the start offset of the bytes.
public  voidsetOptimizedWrite(boolean optimizedWrite)
    
public  booleanstartsWith(String s)
     Returns true if the message bytes starts with the specified string.
public  booleanstartsWithIgnoreCase(String s, int pos)
     Returns true if the message bytes starts with the specified string.
public  intsubstract()
    
public  intsubstract(CharChunk src)
    
public  intsubstract(char src, int off, int len)
    
public  StringtoString()
    


Constructor Detail
CharChunk
public CharChunk()(Code)
Creates a new, uninitialized CharChunk object.



CharChunk
public CharChunk(int size)(Code)




Method Detail
allocate
public void allocate(int initial, int limit)(Code)



append
public void append(char b) throws IOException(Code)



append
public void append(CharChunk src) throws IOException(Code)



append
public void append(char src, int off, int len) throws IOException(Code)
Add data to the buffer



append
public void append(StringBuffer sb) throws IOException(Code)
Add data to the buffer



append
public void append(String s, int off, int len) throws IOException(Code)
Append a string to the buffer



equals
public boolean equals(String s)(Code)
Compares the message bytes to the specified String object.
Parameters:
  s - the String to compare true if the comparison succeeded, false otherwise



equals
public boolean equals(CharChunk cc)(Code)



equals
public boolean equals(char b2, int off2, int len2)(Code)



equals
public boolean equals(byte b2, int off2, int len2)(Code)



equalsIgnoreCase
public boolean equalsIgnoreCase(String s)(Code)
Compares the message bytes to the specified String object.
Parameters:
  s - the String to compare true if the comparison succeeded, false otherwise



flushBuffer
public void flushBuffer() throws IOException(Code)



getBuffer
public char[] getBuffer()(Code)



getChars
public char[] getChars()(Code)



getClone
public CharChunk getClone()(Code)



getEnd
public int getEnd()(Code)



getInt
public int getInt()(Code)



getLength
public int getLength()(Code)
Returns the length of the bytes.



getLimit
public int getLimit()(Code)



getOffset
public int getOffset()(Code)



getStart
public int getStart()(Code)
Returns the start offset of the bytes. For output this is the end of the buffer.



hash
public int hash()(Code)



hashIgnoreCase
public int hashIgnoreCase()(Code)



indexOf
public int indexOf(char c)(Code)



indexOf
public int indexOf(char c, int starting)(Code)
Returns true if the message bytes starts with the specified string.
Parameters:
  s - the string



indexOf
public static int indexOf(char chars, int off, int cend, char qq)(Code)



indexOf
public int indexOf(String src, int srcOff, int srcLen, int myOff)(Code)



isNull
public boolean isNull()(Code)



recycle
public void recycle()(Code)
Resets the message bytes to an uninitialized state.



reset
public void reset()(Code)



setCharInputChannel
public void setCharInputChannel(CharInputChannel in)(Code)
When the buffer is empty, read the data from the input channel.



setCharOutputChannel
public void setCharOutputChannel(CharOutputChannel out)(Code)
When the buffer is full, write the data to the output channel. Also used when large amount of data is appended. If not set, the buffer will grow to the limit.



setChars
public void setChars(char[] c, int off, int len)(Code)



setEnd
public void setEnd(int i)(Code)



setLimit
public void setLimit(int limit)(Code)
Maximum amount of data in this buffer. If -1 or not set, the buffer will grow undefinitely. Can be smaller than the current buffer size ( which will not shrink ). When the limit is reached, the buffer will be flushed ( if out is set ) or throw exception.



setOffset
public void setOffset(int off)(Code)
Returns the start offset of the bytes.



setOptimizedWrite
public void setOptimizedWrite(boolean optimizedWrite)(Code)



startsWith
public boolean startsWith(String s)(Code)
Returns true if the message bytes starts with the specified string.
Parameters:
  s - the string



startsWithIgnoreCase
public boolean startsWithIgnoreCase(String s, int pos)(Code)
Returns true if the message bytes starts with the specified string.
Parameters:
  s - the string



substract
public int substract() throws IOException(Code)



substract
public int substract(CharChunk src) throws IOException(Code)



substract
public int substract(char src, int off, int len) throws IOException(Code)



toString
public String toString()(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.