public abstract class Tokenizer extends Object
Modifier and Type | Field and Description |
---|---|
static int |
TT_EOF |
static int |
TT_EOL |
static int |
TT_WORD |
Constructor and Description |
---|
Tokenizer() |
Modifier and Type | Method and Description |
---|---|
String |
getToken()
This method retrieves the text of the last token found.
|
int |
getType()
This method retrieves the type of the last token found.
|
int |
nextToken()
This method retrieves the next token and returns a constant representing
the type of token found.
|
protected abstract int |
read()
This method must be implemented to read the next character from the
data source.
|
void |
setDelimiter(char delimiter)
This method is used to set the delimiter character recognised
by the tokenizer.
|
protected boolean |
startQuotedIsValid(StringBuilder buffer)
This method allows us to control the behaviour of the tokenizer for
quoted text.
|
public static final int TT_EOL
public static final int TT_EOF
public static final int TT_WORD
protected abstract int read() throws IOException
IOException
public int nextToken() throws IOException
IOException
protected boolean startQuotedIsValid(StringBuilder buffer)
buffer
- the field contents read so farpublic String getToken()
public int getType()
public void setDelimiter(char delimiter)
delimiter
- delimiter characterCopyright © 2000–2024 Packwood Software. All rights reserved.