This class is immutable and thread safe.
| Modifier and Type | Field and Description |
|---|---|
| public static final char | CR
US-ASCII CR, carriage return (13) |
| public static final char | DQUOTE
Double quote |
| public static final char | ESCAPE
Backward slash / escape character |
| public static final char | HT
US-ASCII HT, horizontal-tab (9) |
| public static final TokenParser | |
| public static final char | LF
US-ASCII LF, line feed (10) |
| public static final char | SP
US-ASCII SP, space (32) |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | copyContent(final CharArrayBuffer
buffer with the sequence of chars to be parsed buf, final ParserCursor defines the bounds and current position of the buffer cursor, final BitSet set of delimiting characters. Can be delimiters, final StringBuilder null if the value
is delimited by a whitespace only.destination buffer dst)Transfers content into the destination buffer until a whitespace character or any of the given delimiters is encountered. |
| public void | copyQuotedContent(final CharArrayBuffer
buffer with the sequence of chars to be parsed buf, final ParserCursor defines the bounds and current position of the buffer cursor, final StringBuilder destination buffer dst)Transfers content enclosed with quote marks into the destination buffer. |
| public void | copyUnquotedContent(final CharArrayBuffer
buffer with the sequence of chars to be parsed buf, final ParserCursor defines the bounds and current position of the buffer cursor, final BitSet set of delimiting characters. Can be delimiters, final StringBuilder null if the value
is delimited by a whitespace or a quote only.destination buffer dst)Transfers content into the destination buffer until a whitespace character, a quote, or any of the given delimiters is encountered. |
| public static BitSet | |
| public static boolean | |
| public String | parseToken(final CharArrayBuffer
buffer with the sequence of chars to be parsed buf, final ParserCursor defines the bounds and current position of the buffer cursor, final BitSet set of delimiting characters. Can be delimiters)null if the token
is not delimited by any character.Extracts from the sequence of chars a token terminated with any of the given delimiters discarding semantically insignificant whitespace characters. |
| public String | parseValue(final CharArrayBuffer
buffer with the sequence of chars to be parsed buf, final ParserCursor defines the bounds and current position of the buffer cursor, final BitSet set of delimiting characters. Can be delimiters)null if the value
is not delimited by any character.Extracts from the sequence of chars a value which can be enclosed in quote marks and terminated with any of the given delimiters discarding semantically insignificant whitespace characters. |
| public void | skipWhiteSpace(final CharArrayBuffer
buffer with the sequence of chars to be parsed buf, final ParserCursor defines the bounds and current position of the buffer cursor)Skips semantically insignificant whitespace characters and moves the cursor to the closest non-whitespace character. |
| CR | back to summary |
|---|---|
| public static final char CR US-ASCII CR, carriage return (13) | |
| DQUOTE | back to summary |
|---|---|
| public static final char DQUOTE Double quote | |
| ESCAPE | back to summary |
|---|---|
| public static final char ESCAPE Backward slash / escape character | |
| HT | back to summary |
|---|---|
| public static final char HT US-ASCII HT, horizontal-tab (9) | |
| INSTANCE | back to summary |
|---|---|
| public static final TokenParser INSTANCE | |
| LF | back to summary |
|---|---|
| public static final char LF US-ASCII LF, line feed (10) | |
| SP | back to summary |
|---|---|
| public static final char SP US-ASCII SP, space (32) | |
| TokenParser | back to summary |
|---|---|
| public TokenParser() | |
| copyContent | back to summary |
|---|---|
| public void copyContent(final CharArrayBuffer buf, final ParserCursor cursor, final BitSet delimiters, final StringBuilder dst) Transfers content into the destination buffer until a whitespace character or any of the given delimiters is encountered.
| |
| copyQuotedContent | back to summary |
|---|---|
| public void copyQuotedContent(final CharArrayBuffer buf, final ParserCursor cursor, final StringBuilder dst) Transfers content enclosed with quote marks into the destination buffer.
| |
| copyUnquotedContent | back to summary |
|---|---|
| public void copyUnquotedContent(final CharArrayBuffer buf, final ParserCursor cursor, final BitSet delimiters, final StringBuilder dst) Transfers content into the destination buffer until a whitespace character, a quote, or any of the given delimiters is encountered.
| |
| INIT_BITSET | back to summary |
|---|---|
| public static BitSet INIT_BITSET(final int... b) | |
| isWhitespace | back to summary |
|---|---|
| public static boolean isWhitespace(final char ch) | |
| parseToken | back to summary |
|---|---|
| public String parseToken(final CharArrayBuffer buf, final ParserCursor cursor, final BitSet delimiters) Extracts from the sequence of chars a token terminated with any of the given delimiters discarding semantically insignificant whitespace characters.
| |
| parseValue | back to summary |
|---|---|
| public String parseValue(final CharArrayBuffer buf, final ParserCursor cursor, final BitSet delimiters) Extracts from the sequence of chars a value which can be enclosed in quote marks and terminated with any of the given delimiters discarding semantically insignificant whitespace characters.
| |
| skipWhiteSpace | back to summary |
|---|---|
| public void skipWhiteSpace(final CharArrayBuffer buf, final ParserCursor cursor) Skips semantically insignificant whitespace characters and moves the cursor to the closest non-whitespace character.
| |