API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.io. StreamTokenizer View Source
Author(s)
James Gosling
Since
JDK1.0
Version
1.47, 11/30/05
Serial
Hierarchy
 Object
      StreamTokenizer
Implements
Subclasses
Description
public class StreamTokenizer
  The StreamTokenizer class takes an input stream and parses it into "tokens", allowing the tokens to be read one at a time.
Constructors
private StreamTokenizer ()
Private constructor that initializes everything except the streams.
@Deprecated
public StreamTokenizer (InputStream is)
  Creates a stream tokenizer that parses the specified input stream.
public StreamTokenizer (Reader r)
  Create a tokenizer that parses the given character stream.
Methods
Hide/Show inherited methods
public void commentChar (int ch)
  Specified that the character argument starts a single-line comment.
public void eolIsSignificant (boolean flag)
  Determines whether or not ends of line are treated as tokens.
public int lineno ()
  Return the current line number.
public void lowerCaseMode (boolean fl)
  Determines whether or not word token are automatically lowercased.
public int nextToken () throws IOException
  Parses the next token from the input stream of this tokenizer.
public void ordinaryChar (int ch)
  Specifies that the character argument is "ordinary" in this tokenizer.
public void ordinaryChars (int low, int hi)
  Specifies that all characters c in the range low <= c <= high are "ordinary" in this tokenizer.
public void parseNumbers ()
  Specifies that numbers should be parsed by this tokenizer.
public void 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.
public void quoteChar (int ch)
  Specifies that matching pairs of this character delimit string constants in this tokenizer.
public void 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.
public void slashSlashComments (boolean flag)
  Determines whether or not the tokenizer recognizes C++-style comments.
public void slashStarComments (boolean flag)
  Determines whether or not the tokenizer recognizes C-style comments.
public String toString ()
  Returns the string representation of the current stream token and the line number it occurs on.
public void whitespaceChars (int low, int hi)
  Specifies that all characters c in the range low <= c <= high are white space characters.
public void wordChars (int low, int hi)
  Specifies that all characters c in the range low <= c <= high are word constituents.
Fields
Hide/Show inherited fields
public double nval
  If the current token is a number, this field contains the value of that number.
public String sval
  If the current token is a word token, this field contains a string giving the characters of the word token.
publicfinalstatic int TT_EOF = "-1"
A constant indicating that the end of the stream has been read.
publicfinalstatic int TT_EOL = "10"
A constant indicating that the end of the line has been read.
publicfinalstatic int TT_NUMBER = "-2"
A constant indicating that a number token has been read.
publicfinalstatic int TT_WORD = "-3"
A constant indicating that a word token has been read.
public int ttype
  After a call to the nextToken method, this field contains the type of the token just read.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar