public class StringTokenizer extends java.lang.Object implements IStringTokenizer
| Modifier and Type | Field and Description |
|---|---|
protected java.io.Reader |
_fileReader
Reader to use.
|
protected java.io.StreamTokenizer |
_st
StreamTokenizer to use.
|
private java.util.Stack<java.lang.String> |
stack
Stack used for token push-back
|
| Constructor and Description |
|---|
StringTokenizer(java.lang.String inputFileName)
Initialize _st to read from a input Reader file with the given input file
name.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getNextStringToken()
Get the next token in the stream
|
private java.lang.String |
makeNextStringToken()
Returns the next string in the stream.
|
void |
putStringBack(java.lang.String str)
Puts the given string back into the stream.
|
private java.util.Stack<java.lang.String> stack
protected java.io.StreamTokenizer _st
protected java.io.Reader _fileReader
public StringTokenizer(java.lang.String inputFileName)
throws java.io.FileNotFoundException
inputFileName - the name of the input text filejava.io.FileNotFoundException - When the input file could not be openedpublic java.lang.String getNextStringToken()
getNextStringToken in interface IStringTokenizerpublic void putStringBack(java.lang.String str)
putStringBack in interface IStringTokenizerstr - the token to push back into the tokenizerprivate java.lang.String makeNextStringToken()