|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A simple interface for streaming tokenizers. This assumes that a
token stream can be regarded as a sequence of things of type
String
which end at the end of file. It avoids all the
complexities of the java.io.StreamTokenizer
class.
The expected constructors are one that takes a Reader
,
perhaps optionally one that takes an InputStream
, and
does the composition for the user. There may also be other
optional arguments that specify such things as whether eol is
significant, or whether tokens should be lowercased.
Method Summary | |
String |
next()
Returns the next token from the input Reader. |
void |
pushBack()
Pushback the last read token from the tokenizer for re-reading. |
Method Detail |
public String next() throws IOException
null
.
IOException
- If there is some I/O errorpublic void pushBack()
next()
will return the same
token as the last call to next()
. This allows just
a single level of lookahead in token reading.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |