StreamTokenizer Members

StreamTokenizer Members

Class Overview | This Package | All Packages

Fields
Name Description
nval If the current token is a number, this field contains the value of that number.
sval If the current token is a word token, this field contains a string giving the characters of the word token.
TT_EOF A constant indicating that the end of the stream has been read.
TT_EOL A constant indicating that the end of the line has been read.
TT_NUMBER A constant indicating that a number token has been read.
TT_WORD A constant indicating that a word token has been read.
ttype After a call to the nextToken method, this field contains the type of the token just read.

Constructors
Name Description
StreamTokenizer(InputStream) Creates a stream tokenizer that parses the specified input stream. Deprecated.
StreamTokenizer(Reader) Create a tokenizer that parses the given character stream.

Methods
Name Description
commentChar(int) Specified that the character argument starts a single-line comment.
eolIsSignificant(boolean) Determines whether or not ends of line are treated as tokens.
lineno() Return the current line number.
lowerCaseMode(boolean) Determines whether or not word token are automatically lowercased.
nextToken() Parses the next token from the input stream of this tokenizer.
ordinaryChar(int) Specifies that the character argument is "ordinary" in this tokenizer.
ordinaryChars(int, int) Specifies that all characters c in the range low <= c <= high are "ordinary" in this tokenizer.
parseNumbers() Specifies that numbers should be parsed by this tokenizer.
pushBack() Causes the next call to the nextToken method of this tokenizer to return the current value in the ttype field, and not to modify the value in the nval or sval field.
quoteChar(int) Specifies that matching pairs of this character delimit string constants in this tokenizer.
resetSyntax() Resets this tokenizer's syntax table so that all characters are "ordinary." See the ordinaryChar method for more information on a character being ordinary.
slashSlashComments(boolean) Determines whether or not the tokenizer recognizes C++-style comments.
slashStarComments(boolean) Determines whether or not the tokenizer recognizes C-style comments.
toString() Returns the string representation of the current stream token.
whitespaceChars(int, int) Specifies that all characters c in the range low <= c <= high are white space characters.
wordChars(int, int) Specifies that all characters c in the range low <= c <= high are word constituents.