public abstract class Buffer extends java.lang.Object implements BufferItem
| Modifier and Type | Field and Description |
|---|---|
protected int |
position
The index.
|
static java.lang.String |
STOPCHARSJSON |
static java.lang.String |
STOPCHARSXML |
static char[] |
STOPCHARSXMLEND |
SPACE| Constructor and Description |
|---|
Buffer() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
array(int len,
boolean current)
Return a new Array of Elements
|
boolean |
checkValues(char... items)
Check values of the Current Char
|
byte |
getByte() |
abstract char |
getChar() |
double |
getDouble() |
float |
getFloat() |
int |
getInt() |
long |
getLong() |
short |
getShort() |
CharacterBuffer |
getString(int len)
Get the next String
|
SimpleList<java.lang.String> |
getStringList()
Method for parsing String Elements
|
boolean |
isEmpty() |
boolean |
isEnd()
Is the Buffer is on End
|
char |
nextClean(boolean currentValid)
Get the next char in the string, skipping whitespace.
|
CharacterBuffer |
nextString(char... quotes)
Return the characters up to the next close quote character.
|
CharacterBuffer |
nextString(CharacterBuffer sc,
boolean allowQuote,
boolean nextStep,
char... quotes)
Return the characters up to the next close quote character.
|
CharacterBuffer |
nextToken(boolean current,
char... stopWords)
Get the next Token
|
java.lang.Object |
nextValue(BaseItem creator,
boolean allowQuote,
boolean allowDuppleMark,
char c)
Get the NextVlaue
|
protected CharacterBuffer |
nextValue(char c,
boolean allowDuppleMark) |
protected CharacterBuffer |
parseString(CharacterBuffer sc,
boolean allowQuote,
boolean nextStep,
char... quotes) |
int |
position()
Gets the index.
|
CharacterBuffer |
readLine() |
int |
remaining()
count of Remaining Size of Buffer
|
boolean |
skip()
Skip
|
boolean |
skip(int pos)
Skip number of chars
|
char |
skipChar(char... quotes)
Skip The quotes if the CurrentChar is it
|
boolean |
skipTo(char search,
boolean notEscape)
Skip.
|
boolean |
skipTo(java.lang.String search,
boolean order,
boolean notEscape)
Skip.
|
SimpleList<java.lang.String> |
splitStrings(java.lang.String value,
boolean split)
Split Strings
|
java.lang.String |
substring(int... values) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCurrentChar, length, withLookAHead, withLookAHeadpublic static final java.lang.String STOPCHARSJSON
public static final java.lang.String STOPCHARSXML
public static final char[] STOPCHARSXMLEND
protected int position
public short getShort()
public int getInt()
public abstract char getChar()
getChar in interface BufferItempublic long getLong()
public float getFloat()
public java.lang.String substring(int... values)
public double getDouble()
public byte[] array(int len,
boolean current)
BufferItemarray in interface BufferItemlen - len of next values
-1 remaining length
-2 all size (Only for BufferedBuffer)current - Add Current Byte to Arraypublic byte getByte()
getByte in interface BufferItempublic int position()
BufferItemposition in interface BufferItempublic int remaining()
BufferItemremaining in interface BufferItempublic boolean isEmpty()
isEmpty in interface BufferItempublic boolean isEnd()
BufferItemisEnd in interface BufferItempublic CharacterBuffer getString(int len)
BufferItemgetString in interface BufferItemlen - is the Length of the new Stringpublic CharacterBuffer readLine()
public char nextClean(boolean currentValid)
BufferItemnextClean in interface BufferItemcurrentValid - is the current char also a valid characterpublic CharacterBuffer nextString(char... quotes)
BufferItemnextString in interface BufferItemquotes - for Endpublic CharacterBuffer nextString(CharacterBuffer sc, boolean allowQuote, boolean nextStep, char... quotes)
BufferItemnextString in interface BufferItemsc - StringContainer for manage CharsallowQuote - is allow Quote in StreamnextStep - must i step next after find Textquotes - The quoting character, either "
(double quote) or '
(single quote).protected CharacterBuffer parseString(CharacterBuffer sc, boolean allowQuote, boolean nextStep, char... quotes)
protected CharacterBuffer nextValue(char c, boolean allowDuppleMark)
public java.lang.Object nextValue(BaseItem creator, boolean allowQuote, boolean allowDuppleMark, char c)
BufferItemnextValue in interface BufferItemcreator - Creator for creating Child ItemallowQuote - Is it allow Quote in NextValueallowDuppleMark - Is allow DuppleMarksc - CurrentCharpublic boolean skipTo(char search,
boolean notEscape)
BufferItemskipTo in interface BufferItemsearch - the The String of searchelementsnotEscape - Boolean if escaping the textpublic boolean skipTo(java.lang.String search,
boolean order,
boolean notEscape)
BufferItemskipTo in interface BufferItemsearch - the The String of searchelementsorder - the if the order of search element importentnotEscape - Boolean if escaping the textpublic boolean skip(int pos)
BufferItemskip in interface BufferItempos - the pospublic boolean skip()
BufferItemskip in interface BufferItempublic CharacterBuffer nextToken(boolean current, char... stopWords)
BufferItemnextToken in interface BufferItemcurrent - switch for add the current CharacterstopWords - may be at Simple Spacepublic boolean checkValues(char... items)
BufferItemcheckValues in interface BufferItemitems - the itemspublic SimpleList<java.lang.String> getStringList()
BufferItemgetStringList in interface BufferItempublic SimpleList<java.lang.String> splitStrings(java.lang.String value, boolean split)
BufferItemsplitStrings in interface BufferItemvalue - The String valuesplit - boolean for Splitingpublic char skipChar(char... quotes)
BufferItemskipChar in interface BufferItemquotes - Quotes to Skip