Package java.io
Class StreamTokenizer
Description:
This method parses the next token from the input stream of this tokenizer. The type of the next token is returned in the ttype field. Additional information about the token may be in the nval field or the sval fiel of this tokenizer. Typical clients of this class first set up the syntax tables and then sit in a loop calling nextToken to parse successive tokens until TT_EOF is returned.
Example
File file = new File("testFile");
InputStream is = new FileInputStream(file);
StreamTokenizer st = new StreamTokenizer(is);
...
int token = st.nextToken();
The example above parses the next token from the input stream.