StreamTokenizer.StreamTokenizer
Class Overview | Class Members |
This Package |
All Packages
public StreamTokenizer( InputStream is )
Parameters
- is
- an input stream.
Description
Note: StreamTokenizer() is deprecated.
As of JDK version 1.1, the preferred way to tokenize an
input stream is to convert it into a character stream, for example:
Reader r = new BufferedReader(new InputStreamReader(is));
StreamTokenizer st = new StreamTokenizer(r);
Creates a stream tokenizer that parses the specified input
stream. The stream tokenizer is initialized to the following
default state:
- All byte values 'A' through 'Z',
'a' through 'z', and
'\u00A0' through '\u00FF' are
considered to be alphabetic.
- All byte values '\u0000' through
'\u0020' are considered to be white space.
- '/' is a comment character.
- Single quote '\'' and double quote '"'
are string quote characters.
- Numbers are parsed.
- Ends of lines are treated as white space, not as separate tokens.
- C-style and C++-style comments are not recognized.
See Also
BufferedReader, InputStreamReader, StreamTokenizer
public StreamTokenizer( Reader r )
Description
Create a tokenizer that parses the given character stream.