| Modifier and Type | Field and Description |
|---|---|
| private char[] | |
| private int | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | CharArrayBuffer(final int
the capacity capacity)Creates an instance of |
| Modifier and Type | Method and Description |
|---|---|
| public void | append(final char[]
the chars to be appended. b, final int the index of the first char to append. off, final int the number of chars to append. len)Appends |
| public void | |
| public void | append(final CharArrayBuffer
the source buffer to be appended. b, final int the index of the first char to append. off, final int the number of chars to append. len)Appends |
| public void | append(final CharArrayBuffer
the source buffer to be appended. b)Appends all chars to this buffer from the given source buffer starting
at index |
| public void | |
| public void | append(final byte[]
the bytes to be appended. b, final int the index of the first byte to append. off, final int the number of bytes to append. len)Appends |
| public void | append(final ByteArrayBuffer
the bytes to be appended. b, final int the index of the first byte to append. off, final int the number of bytes to append. len)Appends |
| public void | |
| public char[] | |
| public int | |
| public char | Returns: the char value at the specified index.the index of the desired char value. i)Implements java. char value in this buffer at the specified
index.
|
| public void | |
| public void | ensureCapacity(final int
the minimum required capacity. required)Ensures that the capacity is at least equal to the specified minimum. |
| private void | |
| public int | Returns: the index of the first occurrence of the character in the buffer within the given bounds, or-1 if the character does
not occur.the char to search for. ch, final int the index to start the search from. from, final int the index to finish the search at. to)Returns the index within this buffer of the first occurrence of the
specified character, starting the search at the specified
|
| public int | |
| public boolean | Returns: true if this buffer is empty, false
otherwise.Overrides default java. true if this buffer is empty, that is, its
length() is equal to 0.
|
| public boolean | Returns: true if this buffer is full, false
otherwise.Returns |
| public int | Returns: the length of the bufferImplements java. |
| public void | |
| public CharSequence | subSequence(final int
the start index, inclusive beginIndex, final int the end index, exclusive endIndex)Implements java. CharSequence that is a subsequence of this sequence.
|
| public String | Returns: the specified substring.the beginning index, inclusive. beginIndex, final int the ending index, exclusive. endIndex)Returns a substring of this buffer. |
| public String | Returns: the specified substring.the beginning index, inclusive. beginIndex, final int the ending index, exclusive. endIndex)Returns a substring of this buffer with leading and trailing whitespace omitted. |
| public char[] | |
| public String | toString()
Overrides java. Implements java. |
| buffer | back to summary |
|---|---|
| private char[] buffer | |
| len | back to summary |
|---|---|
| private int len | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| CharArrayBuffer | back to summary |
|---|---|
| public CharArrayBuffer(final int capacity) Creates an instance of
| |
| append | back to summary |
|---|---|
| public void append(final char[] b, final int off, final int len) Appends
| |
| append | back to summary |
|---|---|
| public void append(final String str) Appends chars of the given string to this buffer. The capacity of the buffer is increased, if necessary, to accommodate all chars.
| |
| append | back to summary |
|---|---|
| public void append(final CharArrayBuffer b, final int off, final int len) Appends
| |
| append | back to summary |
|---|---|
| public void append(final CharArrayBuffer b) Appends all chars to this buffer from the given source buffer starting
at index
| |
| append | back to summary |
|---|---|
| public void append(final char ch) Appends
| |
| append | back to summary |
|---|---|
| public void append(final byte[] b, final int off, final int len) Appends The bytes are converted to chars using simple cast.
| |
| append | back to summary |
|---|---|
| public void append(final ByteArrayBuffer b, final int off, final int len) Appends The bytes are converted to chars using simple cast.
| |
| append | back to summary |
|---|---|
| public void append(final Object obj) Appends chars of the textual representation of the given object to this buffer. The capacity of the buffer is increased, if necessary, to accommodate all chars.
| |
| buffer | back to summary |
|---|---|
| public char[] buffer() Returns reference to the underlying char array.
| |
| capacity | back to summary |
|---|---|
| public int capacity() Returns the current capacity. The capacity is the amount of storage available for newly appended chars, beyond which an allocation will occur.
| |
| charAt | back to summary |
|---|---|
| public char charAt(final int i) Implements java. Returns the
| |
| clear | back to summary |
|---|---|
| public void clear() Clears content of the buffer. The underlying char array is not resized. | |
| ensureCapacity | back to summary |
|---|---|
| public void ensureCapacity(final int required) Ensures that the capacity is at least equal to the specified minimum.
If the current capacity is less than the argument, then a new internal
array is allocated with greater capacity. If the
| |
| expand | back to summary |
|---|---|
| private void expand(final int newlen) | |
| indexOf | back to summary |
|---|---|
| public int indexOf(final int ch, final int from, final int to) Returns the index within this buffer of the first occurrence of the
specified character, starting the search at the specified
There is no restriction on the value of
| |
| indexOf | back to summary |
|---|---|
| public int indexOf(final int ch) Returns the index within this buffer of the first occurrence of the
specified character, starting the search at
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Overrides default java. Returns
| |
| isFull | back to summary |
|---|---|
| public boolean isFull() Returns
| |
| length | back to summary |
|---|---|
| public int length() Implements java. Returns the length of the buffer (char count).
| |
| setLength | back to summary |
|---|---|
| public void setLength(final int len) Sets the length of the buffer. The new length value is expected to be
less than the current capacity and greater than or equal to
| |
| subSequence | back to summary |
|---|---|
| public CharSequence subSequence(final int beginIndex, final int endIndex) Implements java. Doc from java. Returns a
| |
| substring | back to summary |
|---|---|
| public String substring(final int beginIndex, final int endIndex) Returns a substring of this buffer. The substring begins at the specified
| |
| substringTrimmed | back to summary |
|---|---|
| public String substringTrimmed(final int beginIndex, final int endIndex) Returns a substring of this buffer with leading and trailing whitespace
omitted. The substring begins with the first non-whitespace character
from
| |
| toCharArray | back to summary |
|---|---|
| public char[] toCharArray() Converts the content of this buffer to an array of chars.
| |
| 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. | |