| Modifier and Type | Class and Description |
|---|---|
| public static interface | CharChunk.
Input interface, used when the buffer is empty. |
| 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 transient CharChunk. | |
| private transient CharChunk. | |
| private static final long |
| 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 char | charAt(int
the index of the index)char value to be returnedImplements java. Returns the |
| private boolean | |
| public Object | |
| public boolean | |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| 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 void | |
| public char[] | |
| protected int | getBufferElement(int index)
Implements abstract org.
|
| public char[] | |
| public int | |
| public int | Returns: The position of the first instance of the character or -1 if the character is not found.The character c, int The start position starting)Returns the first instance of the given character in this CharChunk starting at the specified char. |
| public static int | Returns: The position of the first instance of the character or -1 if the character is not found.The array to search chars, int The point to start searching from in the array start, int The point to stop searching in the array end, char The character to search for s)Returns the first instance of the given character in the given char array between the specified start and end. |
| public int | |
| public void | |
| private int | |
| public void | setCharInputChannel(CharChunk.
The input channel inWhen the buffer is empty, read the data from the input channel. |
| public void | setCharOutputChannel(CharChunk.
The output channel outWhen the buffer is full, write the data to the output channel. |
| public void | setChars(char[]
the characters c, int the start offset of the characters off, int the length of the characters len)Sets the buffer to the specified subarray of characters. |
| public boolean | |
| public boolean | Returns: true if the start matchesthe string s, int The position pos)Returns true if the buffer starts with the specified string. |
| public CharSequence | subSequence(int
the start index, inclusive start, int the end index, exclusive end)Implements java. Returns a |
| public int | |
| public int | |
| public String | toString()
Overrides java. Implements java. Returns a string containing the characters in this sequence in the same order as this sequence. |
| public String |
| buff | back to summary |
|---|---|
| private char[] buff | |
| in | back to summary |
|---|---|
| private transient CharChunk. | |
| out | back to summary |
|---|---|
| private transient CharChunk. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides org. | |
| CharChunk | back to summary |
|---|---|
| public CharChunk() Creates a new, uninitialized CharChunk object. | |
| CharChunk | back to summary |
|---|---|
| public CharChunk(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(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(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.
| |
| charAt | back to summary |
|---|---|
| public char charAt(int index) Implements java. Doc from java. Returns the If the
| |
| checkEof | back to summary |
|---|---|
| private boolean checkEof() throws IOException | |
| clone | back to summary |
|---|---|
| public Object clone() throws CloneNotSupportedException Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| endsWith | back to summary |
|---|---|
public boolean endsWith(String s)
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) 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(String s) Compares the message bytes to the specified String object.
| |
| equals | back to summary |
|---|---|
| public boolean equals(CharChunk cc) | |
| equals | back to summary |
|---|---|
| public boolean equals(char[] b2, int off2, int len2) | |
| equalsIgnoreCase | back to summary |
|---|---|
| public boolean equalsIgnoreCase(String s) Compares the message bytes to the specified String object.
| |
| flushBuffer | back to summary |
|---|---|
| public void flushBuffer() throws IOException Send the buffer to the sink. Called by append() when the limit is reached. You can also call it explicitly to force the data to be written.
| |
| getBuffer | back to summary |
|---|---|
public char[] getBuffer()
| |
| getBufferElement | back to summary |
|---|---|
| protected int getBufferElement(int index) Implements abstract org.
| |
| getChars | back to summary |
|---|---|
public char[] getChars()
| |
| indexOf | back to summary |
|---|---|
| public int indexOf(char c) | |
| indexOf | back to summary |
|---|---|
| public int indexOf(char c, int starting) Returns the first instance of the given character in this CharChunk starting at the specified char. If the
character is not found, -1 is returned.
| |
| indexOf | back to summary |
|---|---|
| public static int indexOf(char[] chars, int start, int end, char s) Returns the first instance of the given character in the given char array between the specified start and end.
| |
| length | back to summary |
|---|---|
| public int length() Implements java. Doc from java. Returns the length of this character sequence. The length is the number
of 16-bit
| |
| makeSpace | back to summary |
|---|---|
| public void makeSpace(int count) Make space for len chars. If len is small, allocate a reserve space too. Never grow bigger than the limit or
| |
| min | back to summary |
|---|---|
| private int min(int a, int b) | |
| 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) Sets the buffer to the specified subarray of characters.
| |
| startsWith | back to summary |
|---|---|
public boolean startsWith(String s)
| |
| startsWithIgnoreCase | back to summary |
|---|---|
| public boolean startsWithIgnoreCase(String s, int pos) Returns true if the buffer starts with the specified string.
| |
| subSequence | back to summary |
|---|---|
| public CharSequence subSequence(int start, int end) Implements java. Doc from java. Returns a
| |
| subtract | back to summary |
|---|---|
| public int subtract() throws IOException | |
| subtract | back to summary |
|---|---|
| public int subtract(char[] dest, int off, int len) throws IOException | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Implements java. Doc from java. Returns a string containing the characters in this sequence in the same order as this sequence. The length of the string will be the length of this sequence. | |
| toStringInternal | back to summary |
|---|---|
| public String toStringInternal() | |
| Modifier and Type | Method and Description |
|---|---|
| public int |
| realReadChars | back to summary |
|---|---|
| public int realReadChars() throws IOException Read new characters.
| |
| Modifier and Type | Method and Description |
|---|---|
| public void | realWriteChars(char[]
characters that will be written buf, int offset in the characters array off, int length that will be written len)Send the bytes ( usually the internal conversion buffer ). |
| realWriteChars | back to summary |
|---|---|
| public void realWriteChars(char[] buf, int off, int len) throws IOException Send the bytes ( usually the internal conversion buffer ). Expect 8k output if the buffer is full.
| |