Tokenizer
@Deprecated @Contract(threading=IMMUTABLE) public class TokenParser extends Tokenizer
This class is immutable and thread safe.
Tokenizer.Cursor
Modifier and Type | Field and Description |
---|---|
static char |
DQUOTE
Deprecated.
Double quote
|
static char |
ESCAPE
Deprecated.
Backward slash / escape character
|
static TokenParser |
INSTANCE
Deprecated.
|
Constructor and Description |
---|
TokenParser()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
copyContent(CharSequence buf,
ParserCursor cursor,
BitSet delimiters,
StringBuilder dst)
Deprecated.
|
void |
copyContent(CharSequence buf,
Tokenizer.Cursor cursor,
BitSet delimiters,
StringBuilder dst)
Deprecated.
Transfers content into the destination buffer until a whitespace character or any of
the given delimiters is encountered.
|
void |
copyQuotedContent(CharSequence buf,
ParserCursor cursor,
StringBuilder dst)
Deprecated.
|
void |
copyQuotedContent(CharSequence buf,
Tokenizer.Cursor cursor,
StringBuilder dst)
Deprecated.
Transfers content enclosed with quote marks into the destination buffer.
|
void |
copyUnquotedContent(CharSequence buf,
ParserCursor cursor,
BitSet delimiters,
StringBuilder dst)
Deprecated.
|
void |
copyUnquotedContent(CharSequence buf,
Tokenizer.Cursor cursor,
BitSet delimiters,
StringBuilder dst)
Deprecated.
Transfers content into the destination buffer until a whitespace character, a quote,
or any of the given delimiters is encountered.
|
String |
parseToken(CharSequence buf,
ParserCursor cursor,
BitSet delimiters)
Deprecated.
|
String |
parseValue(CharSequence buf,
ParserCursor cursor,
BitSet delimiters)
Deprecated.
|
void |
skipWhiteSpace(CharSequence buf,
ParserCursor cursor)
Deprecated.
|
INIT_BITSET, isWhitespace, parseContent, parseToken, parseValue, skipWhiteSpace
public static final TokenParser INSTANCE
public static final char DQUOTE
public static final char ESCAPE
public String parseToken(CharSequence buf, ParserCursor cursor, BitSet delimiters)
public String parseValue(CharSequence buf, ParserCursor cursor, BitSet delimiters)
public void skipWhiteSpace(CharSequence buf, ParserCursor cursor)
public void copyContent(CharSequence buf, ParserCursor cursor, BitSet delimiters, StringBuilder dst)
public void copyContent(CharSequence buf, Tokenizer.Cursor cursor, BitSet delimiters, StringBuilder dst)
Tokenizer
copyContent
in class Tokenizer
buf
- buffer with the sequence of chars to be parsedcursor
- defines the bounds and current position of the bufferdelimiters
- set of delimiting characters. Can be null
if the value
is delimited by a whitespace only.dst
- destination bufferpublic void copyUnquotedContent(CharSequence buf, ParserCursor cursor, BitSet delimiters, StringBuilder dst)
public void copyUnquotedContent(CharSequence buf, Tokenizer.Cursor cursor, BitSet delimiters, StringBuilder dst)
Tokenizer
copyUnquotedContent
in class Tokenizer
buf
- buffer with the sequence of chars to be parsedcursor
- defines the bounds and current position of the bufferdelimiters
- set of delimiting characters. Can be null
if the value
is delimited by a whitespace or a quote only.dst
- destination bufferpublic void copyQuotedContent(CharSequence buf, ParserCursor cursor, StringBuilder dst)
public void copyQuotedContent(CharSequence buf, Tokenizer.Cursor cursor, StringBuilder dst)
Tokenizer
copyQuotedContent
in class Tokenizer
buf
- buffer with the sequence of chars to be parsedcursor
- defines the bounds and current position of the bufferdst
- destination bufferCopyright © 2005–2021 The Apache Software Foundation. All rights reserved.