| Modifier and Type | Class and Description |
|---|---|
| public static interface | |
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private String | |
| private Charset | |
| private Charset | |
| private static final Charset | DEFAULT_CHARSET
Default encoding used to convert to strings. |
| private int | |
| private transient ByteChunk. | |
| private boolean | |
| private int | |
| private boolean | |
| private transient ByteChunk. | |
| 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 | |
| pack-priv boolean | |
| public static byte[] | Returns: the byte array valueto convert to byte array value)Convert specified String to a byte array. |
| public void | |
| public boolean | equals(Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public boolean | |
| public boolean | Returns: true if the comparison succeeded, false otherwisethe bytes)byte[] to compareCompares the message bytes to the specified byte array. |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public static boolean | equals(final byte[] b1, final int b1Offs, final int b1Len, final byte[] b2, final int b2Offs, final int b2Len)
|
| public static 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 | |
| public boolean | |
| public static boolean | equalsIgnoreCase(final byte[] b1, final int b1Offs, final int b1Len, final byte[] b2, final int b2Offs, final int b2Len)
|
| public static boolean | Returns: true if the comparison succeeded, false otherwisethe String to compare s)Compares the message bytes to the specified String object. |
| public boolean | |
| public static boolean | Returns: true if the comparison succeeded, false otherwisethe buffer, final int byte[] to comparebuffer start start, final int buffer end end, final byte[] byte[] to compare against cmpTo)Compares the buffer chunk to the specified byte array representing lower-case ASCII characters. |
| public static int | Returns: index of char if found, -1 if notFind a character, no side effects. |
| public static int | Returns: index of char if found, -1 if notFind a character, no side effects. |
| public static int | Returns: index of char if found, -1 if notFind the first character != c |
| public void | |
| public byte[] | |
| public byte[] | |
| public Charset | |
| public ByteChunk | |
| public int | |
| public int | |
| public int | getLength()
Implements org. Returns the length of the bytes. |
| public int | |
| public long | |
| public int | |
| public int | getStart()
Implements org. Returns the start offset of the bytes. |
| public int | |
| private static int | |
| private static int | |
| public int | |
| public int | |
| public int | |
| public int | |
| public int | indexOf(char
the character c, int The start position starting)Implements org. Returns true if the message bytes starts with the specified string. |
| public static int | |
| public boolean | |
| private void | |
| protected void | |
| public void | |
| public void | |
| public void | |
| protected void | |
| public void | setByteInputChannel(ByteChunk.
When the buffer is empty, read the data from the input channel. |
| public void | setByteOutputChannel(ByteChunk.
When the buffer is full, write the data to the output channel. |
| public void | setBytes(byte[]
the ascii bytes b, int the start offset of the bytes off, int the length of the bytes len)Sets the message bytes to the specified sub-array of bytes. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public boolean | |
| public boolean | startsWith(String
the string s, int The position offset)Returns true if the message bytes starts with the specified string. |
| public boolean | |
| public static boolean | |
| public boolean | startsWithIgnoreCase(String
the string s, int The position 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 String | |
| public void |
| buff | back to summary |
|---|---|
| private byte[] buff | |
| cachedString | back to summary |
|---|---|
| private String cachedString | |
| cachedStringCharset | back to summary |
|---|---|
| private Charset cachedStringCharset | |
| charset | back to summary |
|---|---|
| private Charset charset | |
| DEFAULT_CHARSET | back to summary |
|---|---|
| private static final Charset DEFAULT_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 ByteChunk. | |
| 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 ByteChunk. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| start | back to summary |
|---|---|
| private int start | |
| ByteChunk | back to summary |
|---|---|
| public ByteChunk() Creates a new, uninitialized ByteChunk object. | |
| ByteChunk | back to summary |
|---|---|
| public ByteChunk(int initial) | |
| allocate | back to summary |
|---|---|
| public void allocate(int initial, int limit) | |
| append | back to summary |
|---|---|
| public void append(char c) throws IOException | |
| append | back to summary |
|---|---|
| public void append(byte b) throws IOException | |
| append | back to summary |
|---|---|
| public void append(ByteChunk src) throws IOException | |
| append | back to summary |
|---|---|
| public void append(byte[] src, int off, int len) throws IOException Add data to the buffer | |
| canGrow | back to summary |
|---|---|
| pack-priv boolean canGrow() | |
| convertToBytes | back to summary |
|---|---|
| public static byte[] convertToBytes(String value) Convert specified String to a byte array.
| |
| delete | back to summary |
|---|---|
| public void delete(final int start, final int end) Implements org.
| |
| 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(final String s) Compares the message bytes to the specified String object.
| |
| equals | back to summary |
|---|---|
| public boolean equals(final byte[] bytes) Compares the message bytes to the specified byte array.
| |
| equals | back to summary |
|---|---|
| public boolean equals(ByteChunk bb) | |
| equals | back to summary |
|---|---|
| public boolean equals(byte[] b2, int off2, int len2) | |
| equals | back to summary |
|---|---|
| public boolean equals(CharChunk cc) | |
| equals | back to summary |
|---|---|
| public boolean equals(char[] c2, int off2, int len2) | |
| equals | back to summary |
|---|---|
| public static boolean equals(final byte[] b1, final int b1Offs, final int b1Len, final byte[] b2, final int b2Offs, final int b2Len) | |
| equals | back to summary |
|---|---|
| public static boolean equals(final byte[] b, int offs, final int len, final String s) | |
| equalsIgnoreCase | back to summary |
|---|---|
| public boolean equalsIgnoreCase(final String s) Compares the message bytes to the specified String object.
| |
| equalsIgnoreCase | back to summary |
|---|---|
| public boolean equalsIgnoreCase(final byte[] b) | |
| equalsIgnoreCase | back to summary |
|---|---|
| public boolean equalsIgnoreCase(final byte[] b, final int offset, final int len) | |
| equalsIgnoreCase | back to summary |
|---|---|
| public static boolean equalsIgnoreCase(final byte[] b1, final int b1Offs, final int b1Len, final byte[] b2, final int b2Offs, final int b2Len) | |
| equalsIgnoreCase | back to summary |
|---|---|
| public static boolean equalsIgnoreCase(final byte[] b, final int offset, final int len, final String s) Compares the message bytes to the specified String object.
| |
| equalsIgnoreCaseLowerCase | back to summary |
|---|---|
| public boolean equalsIgnoreCaseLowerCase(byte[] cmpTo) | |
| equalsIgnoreCaseLowerCase | back to summary |
|---|---|
| public static boolean equalsIgnoreCaseLowerCase(final byte[] buffer, final int start, final int end, final byte[] cmpTo) Compares the buffer chunk to the specified byte array representing lower-case ASCII characters.
| |
| findChar | back to summary |
|---|---|
| public static int findChar(byte[] buf, int start, int end, char c) Find a character, no side effects.
| |
| findChars | back to summary |
|---|---|
| public static int findChars(byte[] buf, int start, int end, byte[] c) Find a character, no side effects.
| |
| findNotChars | back to summary |
|---|---|
| public static int findNotChars(byte[] buf, int start, int end, byte[] c) Find the first character != c
| |
| flushBuffer | back to summary |
|---|---|
| public void flushBuffer() throws IOException | |
| getBuffer | back to summary |
|---|---|
| public byte[] getBuffer() Returns the message bytes. | |
| getBytes | back to summary |
|---|---|
| public byte[] getBytes() Returns the message bytes. | |
| getCharset | back to summary |
|---|---|
| public Charset getCharset() | |
| getClone | back to summary |
|---|---|
| public ByteChunk 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. XXX need to clean this up
| |
| getLimit | back to summary |
|---|---|
| public int getLimit() | |
| getLong | back to summary |
|---|---|
| public long getLong() | |
| getOffset | back to summary |
|---|---|
| public int getOffset() | |
| 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() | |
| hashBytes | back to summary |
|---|---|
| private static int hashBytes(byte[] buff, int start, int bytesLen) | |
| hashBytesIC | back to summary |
|---|---|
| private static int hashBytesIC(byte[] bytes, int start, int bytesLen) | |
| 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(final String s, int fromIdx) Implements org.
| |
| indexOf | back to summary |
|---|---|
| public int indexOf(String src, int srcOff, int srcLen, int myOff) | |
| 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(byte[] bytes, int off, int end, char qq) | |
| isNull | back to summary |
|---|---|
| public boolean isNull() | |
| makeSpace | back to summary |
|---|---|
| private void makeSpace(int count) Make space for len chars. If len is small, allocate a reserve space too. Never grow bigger than limit. | |
| 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 buff to an uninitialized state. | |
| recycleAndReset | back to summary |
|---|---|
| public void recycleAndReset() | |
| reset | back to summary |
|---|---|
| public void reset() | |
| resetStringCache | back to summary |
|---|---|
| protected void resetStringCache() | |
| setByteInputChannel | back to summary |
|---|---|
| public void setByteInputChannel(ByteChunk. When the buffer is empty, read the data from the input channel. | |
| setByteOutputChannel | back to summary |
|---|---|
| public void setByteOutputChannel(ByteChunk. 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. | |
| setBytes | back to summary |
|---|---|
| public void setBytes(byte[] b, int off, int len) Sets the message bytes to the specified sub-array of bytes.
| |
| setCharset | back to summary |
|---|---|
| public void setCharset(Charset charset) | |
| 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. | |
| setOffset | back to summary |
|---|---|
| public void setOffset(int off) | |
| setOptimizedWrite | back to summary |
|---|---|
| public void setOptimizedWrite(boolean optimizedWrite) | |
| setStart | back to summary |
|---|---|
| public void setStart(int start) Implements org.
| |
| startsWith | back to summary |
|---|---|
| public boolean startsWith(String s) Returns true if the message bytes starts with the specified string.
| |
| startsWith | back to summary |
|---|---|
| public boolean startsWith(String s, int offset) Returns true if the message bytes starts with the specified string.
| |
| startsWith | back to summary |
|---|---|
| public boolean startsWith(byte[] b2) | |
| startsWith | back to summary |
|---|---|
| public static boolean startsWith(final byte[] buffer, final int start, final int end, final byte[] cmpTo) | |
| startsWithIgnoreCase | back to summary |
|---|---|
| public boolean startsWithIgnoreCase(String s, 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(ByteChunk src) throws IOException | |
| substract | back to summary |
|---|---|
| public int substract(byte[] 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.
| |
| toString | back to summary |
|---|---|
| public String toString(Charset charset) | |
| toStringInternal | back to summary |
|---|---|
| public String toStringInternal() | |
| trimLeft | back to summary |
|---|---|
| public void trimLeft() | |
| Modifier and Type | Method and Description |
|---|---|
| public int | realReadBytes(byte[] cbuf, int off, int len)
Read new bytes ( usually the internal conversion buffer ). |
| realReadBytes | back to summary |
|---|---|
| public int realReadBytes(byte[] 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 | realWriteBytes(byte[] cbuf, int off, int len)
Send the bytes ( usually the internal conversion buffer ). |
| realWriteBytes | back to summary |
|---|---|
| public void realWriteBytes(byte[] cbuf, int off, int len) throws IOException Send the bytes ( usually the internal conversion buffer ). Expect 8k output if the buffer is full. | |