|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mpxj.utility.Tokenizer
public abstract class Tokenizer
This class implements a tokenizer based loosely on java.io.StreamTokenizer. This tokenizer is designed to parse records from an MPX file correctly. In particular it will handle empty fields, represented by adjacent field delimiters.
| Field Summary | |
|---|---|
static int |
TT_EOF
|
static int |
TT_EOL
|
static int |
TT_WORD
|
| Constructor Summary | |
|---|---|
Tokenizer()
|
|
| Method Summary | |
|---|---|
String |
getToken()
This method retrieves the text of the last token found. |
int |
getType()
This method retrieves the type of the last token found. |
int |
nextToken()
This method retrieves the next token and returns a constant representing the type of token found. |
protected abstract int |
read()
This method must be implemented to read the next character from the data source. |
void |
setDelimiter(char delimiter)
This method is used to set the delimiter character recognised by the tokenizer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TT_EOL
public static final int TT_EOF
public static final int TT_WORD
| Constructor Detail |
|---|
public Tokenizer()
| Method Detail |
|---|
protected abstract int read()
throws IOException
IOException
public int nextToken()
throws IOException
IOExceptionpublic String getToken()
public int getType()
public void setDelimiter(char delimiter)
delimiter - delimiter character
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||