| Modifier and Type | Class and Description |
|---|---|
| public static interface | |
| public static interface | CharChunk.
When we need more space we'll either grow the buffer ( up to the limit ) or send it to a channel. |
| Modifier and Type | Field and Description |
|---|---|
| private char[] | |
| private String | |
| public static final Charset | DEFAULT_HTTP_CHARSET
Default encoding used to convert to strings. |
| private int | |
| private transient CharChunk. | |
| private boolean | |
| private int | |
| private boolean | |
| private transient CharChunk. | |
| private static final long | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public boolean | |
| public void | |
| public boolean | equals(Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public boolean | Returns: true if the comparison succeeded, false otherwisethe String to compare s)Compares the message bytes to the specified String object. |
| public boolean | Returns: true if the comparison succeeded, false otherwisethe b)byte[] to compareCompares the message bytes to the specified byte array representing ASCII characters. |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | Returns: true if the comparison succeeded, false otherwisethe String to compare s)Compares the message bytes to the specified String object. |
| public boolean | Returns: true if the comparison succeeded, false otherwisethe b)byte[] to compareCompares the message bytes to the specified byte array representing ASCII characters. |
| public boolean | Returns: true if the comparison succeeded, false otherwisethe b, final int offset, final int len)byte[] to compareCompares the message bytes to the specified byte array representing ASCII characters. |
| public boolean | Returns: true if the comparison succeeded, false otherwisethe b, final int offset, final int len)char[] to compareCompares the message bytes to the specified char array representing ASCII characters. |
| public boolean | Returns: true if the comparison succeeded, false otherwisethe b)byte[] to compareCompares the char chunk to the specified byte array representing lower-case ASCII characters. |
| public void | |
| public char[] | |
| public char[] | |
| public CharChunk | |
| public int | |
| public int | |
| public int | getLength()
Implements org. Returns the length of the bytes. |
| public int | |
| public int | getStart()
Implements org. Returns the start offset of the bytes. |
| public int | |
| public int | |
| public int | |
| public int | |
| public int | indexOf(char
the character c, int starting)Implements org. Returns true if the message bytes starts with the specified string. |
| public static int | |
| public int | |
| public int | |
| public boolean | |
| pack-priv void | |
| private int | |
| protected void | |
| public void | |
| public void | |
| protected void | |
| public void | |
| public void | set(final BufferChunk bufferChunk, final Charset encoding)
Set |
| public void | setCharInputChannel(CharChunk.
When the buffer is empty, read the data from the input channel. |
| public void | setCharOutputChannel(CharChunk.
When the buffer is full, write the data to the output channel. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setStart(int start)
Implements org. Returns the start offset of the bytes. |
| public boolean | |
| pack-priv boolean | |
| public boolean | startsWithIgnoreCase(final String
the string s, final int pos)Returns true if the message bytes starts with the specified string. |
| public int | |
| public int | |
| public int | |
| public String | |
| public String | |
| public String | |
| public void |
| buff | back to summary |
|---|---|
| private char[] buff | |
| cachedString | back to summary |
|---|---|
| private String cachedString | |
| DEFAULT_HTTP_CHARSET | back to summary |
|---|---|
| public static final Charset DEFAULT_HTTP_CHARSET Default encoding used to convert to strings. It should be UTF8, as most standards seem to converge, but the servlet API requires 8859_1, and this object is used mostly for servlets. | |
| end | back to summary |
|---|---|
| private int end | |
| in | back to summary |
|---|---|
| private transient CharChunk. | |
| isSet | back to summary |
|---|---|
| private boolean isSet | |
| limit | back to summary |
|---|---|
| private int limit | |
| optimizedWrite | back to summary |
|---|---|
| private boolean optimizedWrite | |
| out | back to summary |
|---|---|
| private transient CharChunk. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| start | back to summary |
|---|---|
| private int start | |
| CharChunk | back to summary |
|---|---|
| public CharChunk() Creates a new, uninitialized CharChunk object. | |
| CharChunk | back to summary |
|---|---|
| public CharChunk(int size) | |
| allocate | back to summary |
|---|---|
| public void allocate(int initial, int limit) | |
| append | back to summary |
|---|---|
| public void append(char b) throws IOException | |
| append | back to summary |
|---|---|
| public void append(CharChunk src) throws IOException | |
| append | back to summary |
|---|---|
| public void append(char[] src, int off, int len) throws IOException Add data to the buffer | |
| append | back to summary |
|---|---|
| public void append(StringBuffer sb) throws IOException Add data to the buffer | |
| append | back to summary |
|---|---|
| public void append(String s) throws IOException Append a string to the buffer | |
| append | back to summary |
|---|---|
| public void append(String s, int off, int len) throws IOException Append a string to the buffer | |
| delete | back to summary |
|---|---|
| public void delete(final int start, final int end) Implements org.
| |
| endsWith | back to summary |
|---|---|
| public boolean endsWith(String s) | |
| ensureCapacity | back to summary |
|---|---|
| public void ensureCapacity(final int size) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| equals | back to summary |
|---|---|
| public boolean equals(CharSequence s) Compares the message bytes to the specified String object.
| |
| equals | back to summary |
|---|---|
| public boolean equals(byte[] b) Compares the message bytes to the specified byte array representing ASCII characters.
| |
| equals | back to summary |
|---|---|
| public boolean equals(CharChunk cc) | |
| equals | back to summary |
|---|---|
| public boolean equals(char[] b2, int off2, int len2) | |
| equals | back to summary |
|---|---|
| public boolean equals(byte[] b2, int off2, int len2) | |
| equalsIgnoreCase | back to summary |
|---|---|
| public boolean equalsIgnoreCase(CharSequence s) Compares the message bytes to the specified String object.
| |
| equalsIgnoreCase | back to summary |
|---|---|
| public boolean equalsIgnoreCase(final byte[] b) Compares the message bytes to the specified byte array representing ASCII characters.
| |
| equalsIgnoreCase | back to summary |
|---|---|
| public boolean equalsIgnoreCase(final byte[] b, final int offset, final int len) Compares the message bytes to the specified byte array representing ASCII characters.
| |
| equalsIgnoreCase | back to summary |
|---|---|
| public boolean equalsIgnoreCase(final char[] b, final int offset, final int len) Compares the message bytes to the specified char array representing ASCII characters.
| |
| equalsIgnoreCaseLowerCase | back to summary |
|---|---|
| public boolean equalsIgnoreCaseLowerCase(final byte[] b) Compares the char chunk to the specified byte array representing lower-case ASCII characters.
| |
| flushBuffer | back to summary |
|---|---|
| public void flushBuffer() throws IOException | |
| getBuffer | back to summary |
|---|---|
| public char[] getBuffer() | |
| getChars | back to summary |
|---|---|
| public char[] getChars() | |
| getClone | back to summary |
|---|---|
| public CharChunk getClone() | |
| getEnd | back to summary |
|---|---|
| public int getEnd() Implements org.
| |
| getInt | back to summary |
|---|---|
| public int getInt() | |
| getLength | back to summary |
|---|---|
| public int getLength() Implements org. Returns the length of the bytes.
| |
| getLimit | back to summary |
|---|---|
| public int getLimit() | |
| getStart | back to summary |
|---|---|
| public int getStart() Implements org. Returns the start offset of the bytes. For output this is the end of the buffer.
| |
| hash | back to summary |
|---|---|
| public int hash() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| hashIgnoreCase | back to summary |
|---|---|
| public int hashIgnoreCase() | |
| indexOf | back to summary |
|---|---|
| public int indexOf(char c) | |
| indexOf | back to summary |
|---|---|
| public int indexOf(char c, int starting) Implements org. Returns true if the message bytes starts with the specified string.
| |
| indexOf | back to summary |
|---|---|
| public static int indexOf(char[] chars, int off, int cend, char qq) | |
| indexOf | back to summary |
|---|---|
| public int indexOf(String s, int fromIndex) Implements org.
| |
| indexOf | back to summary |
|---|---|
| public int indexOf(String src, int srcOff, int srcLen, int myOff) | |
| isNull | back to summary |
|---|---|
| public boolean isNull() | |
| makeSpace | back to summary |
|---|---|
| pack-priv void makeSpace(int count) Make space for len chars. If len is small, allocate a reserve space too. Never grow bigger than limit. | |
| min | back to summary |
|---|---|
| private int min(int a, int b) | |
| notifyDirectUpdate | back to summary |
|---|---|
| protected void notifyDirectUpdate() Notify the Chunk that its content is going to be changed directly | |
| recycle | back to summary |
|---|---|
| public void recycle() Resets the message bytes to an uninitialized state. | |
| reset | back to summary |
|---|---|
| public void reset() | |
| resetStringCache | back to summary |
|---|---|
| protected void resetStringCache() | |
| set | back to summary |
|---|---|
| public void set(final ByteChunk byteChunk, final Charset encoding) throws CharConversionException | |
| set | back to summary |
|---|---|
| public void set(final BufferChunk bufferChunk, final Charset encoding) throws CharConversionException Set | |
| setCharInputChannel | back to summary |
|---|---|
| public void setCharInputChannel(CharChunk. When the buffer is empty, read the data from the input channel. | |
| setCharOutputChannel | back to summary |
|---|---|
| public void setCharOutputChannel(CharChunk. 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 | back to summary |
|---|---|
| public void setChars(char[] c, int off, int len) | |
| setEnd | back to summary |
|---|---|
| public void setEnd(int i) Implements org.
| |
| setLimit | back to summary |
|---|---|
| public void setLimit(int limit) Maximum amount of data in this buffer. If -1 or not set, the buffer will grow indefinitely. 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. | |
| setOptimizedWrite | back to summary |
|---|---|
| public void setOptimizedWrite(boolean optimizedWrite) | |
| setStart | back to summary |
|---|---|
| public void setStart(int start) Implements org. Returns the start offset of the bytes.
| |
| startsWith | back to summary |
|---|---|
| public boolean startsWith(String s) Returns true if the message bytes starts with the specified string.
| |
| startsWith | back to summary |
|---|---|
| pack-priv boolean startsWith(final String s, final int pos) | |
| startsWithIgnoreCase | back to summary |
|---|---|
| public boolean startsWithIgnoreCase(final String s, final int pos) Returns true if the message bytes starts with the specified string.
| |
| substract | back to summary |
|---|---|
| public int substract() throws IOException | |
| substract | back to summary |
|---|---|
| public int substract(CharChunk src) throws IOException | |
| substract | back to summary |
|---|---|
| public int substract(char[] src, int off, int len) throws IOException | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| toString | back to summary |
|---|---|
| public String toString(int start, int end) Implements org.
| |
| toStringInternal | back to summary |
|---|---|
| public String toStringInternal() | |
| trimLeft | back to summary |
|---|---|
| public void trimLeft() | |
| Modifier and Type | Method and Description |
|---|---|
| public int | realReadChars(char[] cbuf, int off, int len)
Read new bytes ( usually the internal conversion buffer ). |
| realReadChars | back to summary |
|---|---|
| public int realReadChars(char[] cbuf, int off, int len) throws IOException Read new bytes ( usually the internal conversion buffer ). The implementation is allowed to ignore the parameters, and mutate the chunk if it wishes to implement its own buffering. | |
| Modifier and Type | Method and Description |
|---|---|
| public void | realWriteChars(char[] cbuf, int off, int len)
Send the bytes ( usually the internal conversion buffer ). |
| realWriteChars | back to summary |
|---|---|
| public void realWriteChars(char[] cbuf, int off, int len) throws IOException Send the bytes ( usually the internal conversion buffer ). Expect 8k output if the buffer is full. | |