public class DefaultStreamTokenizer extends Object implements Tokenizer
StreamTokenizer
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log |
Constructor and Description |
---|
DefaultStreamTokenizer(InputStream is) |
Modifier and Type | Method and Description |
---|---|
int |
countTokens()
Returns number of tokens
PLEASE NOTE: this method effectively preloads all tokens.
|
List<String> |
getTokens()
Returns all tokens as list of Strings
|
boolean |
hasMoreTokens()
Checks, if any prebuffered tokens left, otherswise checks underlying stream
|
String |
nextToken()
This method returns next token from prebuffered list of tokens or underlying InputStream
|
void |
setTokenPreProcessor(TokenPreProcess tokenPreProcessor)
Set the token pre process
|
public DefaultStreamTokenizer(InputStream is)
public boolean hasMoreTokens()
hasMoreTokens
in interface Tokenizer
public int countTokens()
countTokens
in interface Tokenizer
public String nextToken()
public void setTokenPreProcessor(TokenPreProcess tokenPreProcessor)
Tokenizer
setTokenPreProcessor
in interface Tokenizer
tokenPreProcessor
- the token pre processor to setCopyright © 2017. All rights reserved.