public class CharacterBuffer extends BufferedBuffer implements java.lang.CharSequence
lengthposition, STOPCHARSJSON, STOPCHARSXML, STOPCHARSXMLENDSPACE| Constructor and Description |
|---|
CharacterBuffer() |
| Modifier and Type | Method and Description |
|---|---|
CharacterBuffer |
addStart(int pos) |
byte |
byteAt(int index) |
char |
charAt(int index)
Returns the
char value in this sequence at the specified index. |
void |
clear() |
static CharacterBuffer |
create(java.lang.CharSequence value) |
boolean |
endsWith(java.lang.CharSequence string,
boolean ignoreCase) |
boolean |
equals(java.lang.CharSequence other) |
boolean |
equalsIgnoreCase(java.lang.CharSequence other) |
char |
getChar()
Get the next character in the source string.
|
java.lang.String |
getStringPart(java.lang.Character start,
java.lang.Character end)
get the () values
|
int |
indexOf(int ch) |
int |
indexOf(int ch,
int fromIndex) |
int |
indexOf(java.lang.String ch) |
boolean |
isEmptyCharacter() |
int |
lastIndexOf(char ch) |
int |
remaining()
Returns the number of elements between the current position and the limit.
|
char |
remove(int position) |
boolean |
replace(int start,
int end,
java.lang.String replace) |
void |
replace(java.lang.String search,
java.lang.String replace) |
void |
reset() |
CharacterBuffer |
set(char value)
Init the new CharacterBuffer
|
CharacterBuffer |
set(java.lang.CharSequence value)
Init the new CharList
|
void |
setNextString(java.lang.CharSequence property,
int pos) |
boolean |
startsWith(java.lang.CharSequence prefix) |
boolean |
startsWith(java.lang.CharSequence prefix,
int toffset,
boolean ignoreCase) |
CharacterBuffer |
subSequence(int start,
int end)
Returns a new character sequence that is a subsequence of this sequence.
|
byte[] |
toByteArray() |
char[] |
toCharArray() |
java.lang.String |
toCurrentString() |
java.lang.String |
toString() |
CharacterBuffer |
trim() |
CharacterBuffer |
trimStart(int pos) |
CharacterBuffer |
with(byte[] values)
Init the new CharacterBuffer
|
CharacterBuffer |
with(char src)
Init the new CharList
|
CharacterBuffer |
with(char[] values,
int start,
int length)
Init the new CharList
|
CharacterBuffer |
with(char[] values,
int start,
int end,
boolean copy)
Init the new CharList
|
CharacterBuffer |
with(java.lang.CharSequence... items)
Init the new CharacterBuffer
|
CharacterBuffer |
with(java.lang.CharSequence values,
int start,
int end)
Init the new CharacterBuffer
|
CharacterBuffer |
with(int value) |
CharacterBuffer |
with(long value) |
CharacterBuffer |
withBufferLength(int len) |
CharacterBuffer |
withLength(int len) |
CharacterBuffer |
withLine(java.lang.CharSequence value) |
CharacterBuffer |
withObjects(java.lang.Object... items)
Init the new CharacterBuffer
|
void |
withRepeat(java.lang.String string,
int rest) |
CharacterBuffer |
withStart(char item)
Append a new Character to CharacterBuffer
|
CharacterBuffer |
withStartPosition(int pos)
Set the Current Startposition
|
CharacterBuffer |
withValue(java.lang.String value)
Set the currentVlaue to Buffer
|
CharacterBuffer |
write(byte[] values,
int length) |
back, getCurrentChar, getNextString, isEnd, length, nextValue, parseString, substring, withLookAHead, withLookAHead, withPositionarray, checkValues, getByte, getDouble, getFloat, getInt, getLong, getShort, getString, getStringList, isEmpty, nextClean, nextString, nextString, nextToken, nextValue, position, readLine, skip, skip, skipChar, skipTo, skipTo, splitStringspublic char charAt(int index)
char value in this sequence at the specified index.
The first char value is at index 0, the next at index
1, and so on, as in array indexing.
The index argument must be greater than or equal to
0, and less than the length of this sequence.
If the char value specified by the index is a
surrogate, the surrogate
value is returned.
charAt in interface java.lang.CharSequencecharAt in class BufferedBufferindex - the index of the desired char value.char value at the specified index.public byte byteAt(int index)
byteAt in class BufferedBufferpublic CharacterBuffer subSequence(int start, int end)
An invocation of this method of the form
sb.subSequence(begin, end)
behaves in exactly the same way as the invocation
sb.substring(begin, end)
This method is provided so that this class can
implement the CharSequence interface.subSequence in interface java.lang.CharSequencesubSequence in class BufferedBufferstart - the start index, inclusive.end - the end index, exclusive.java.lang.IndexOutOfBoundsException - if start or end are negative,
if end is greater than length(), or if start is greater than endpublic CharacterBuffer withValue(java.lang.String value)
value - String of Valuepublic char[] toCharArray()
public byte[] toByteArray()
public boolean replace(int start,
int end,
java.lang.String replace)
public void replace(java.lang.String search,
java.lang.String replace)
public char getChar()
getChar in interface BufferItempublic CharacterBuffer with(byte[] values)
values - the reference CharArraypublic CharacterBuffer withLine(java.lang.CharSequence value)
public CharacterBuffer withLength(int len)
withLength in class BufferedBufferpublic CharacterBuffer withBufferLength(int len)
public CharacterBuffer withStartPosition(int pos)
pos - The new Startpositionpublic CharacterBuffer with(char[] values, int start, int end, boolean copy)
values - the reference CharArraystart - the Startposition for the new CharacterBufferend - the Endposition for the new CharacterBuffercopy - Boolean if copy the Array to new onepublic CharacterBuffer with(char[] values, int start, int length)
values - the reference CharArraystart - the Startposition for the new CharacterBufferlength - the Endposition for the new CharacterBufferpublic CharacterBuffer write(byte[] values, int length)
public CharacterBuffer with(java.lang.CharSequence values, int start, int end)
values - the reference CharSequencestart - the Startposition for the new CharacterBufferend - the Endposition for the new CharacterBufferpublic CharacterBuffer with(java.lang.CharSequence... items)
items - the reference CharSequencepublic CharacterBuffer with(int value)
public CharacterBuffer with(long value)
public CharacterBuffer withStart(char item)
item - a new StartItempublic CharacterBuffer set(java.lang.CharSequence value)
value - the reference CharSequencepublic CharacterBuffer set(char value)
value - the reference CharSequencepublic boolean startsWith(java.lang.CharSequence prefix)
public boolean startsWith(java.lang.CharSequence prefix,
int toffset,
boolean ignoreCase)
public final int remaining()
remaining in interface BufferItemremaining in class Bufferpublic final void clear()
public char remove(int position)
public CharacterBuffer addStart(int pos)
public CharacterBuffer trimStart(int pos)
public CharacterBuffer trim()
public boolean isEmptyCharacter()
public void withRepeat(java.lang.String string,
int rest)
public CharacterBuffer withObjects(java.lang.Object... items)
items - the reference CharSequencepublic CharacterBuffer with(char src)
src - the reference CharSequencepublic void reset()
public java.lang.String toString()
toString in interface java.lang.CharSequencetoString in class java.lang.Objectpublic boolean equals(java.lang.CharSequence other)
public boolean equalsIgnoreCase(java.lang.CharSequence other)
public int indexOf(int ch)
public int indexOf(java.lang.String ch)
public int indexOf(int ch,
int fromIndex)
public int lastIndexOf(char ch)
public java.lang.String getStringPart(java.lang.Character start,
java.lang.Character end)
start - Startcharacterend - Endcharacterpublic boolean endsWith(java.lang.CharSequence string,
boolean ignoreCase)
public void setNextString(java.lang.CharSequence property,
int pos)
public static CharacterBuffer create(java.lang.CharSequence value)
public java.lang.String toCurrentString()