|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.j3d.loaders.lw3d.TextfileParser
class TextfileParser
This class is a superclass for most of the Lws* Scene-file parsing classes. It provides some debugging utilities, as well as utilities for reading the types of data common to this loader.
Field Summary | |
---|---|
(package private) int |
currentLevel
|
protected DebugOutput |
debugPrinter
|
(package private) static int |
EXCEPTION
|
(package private) static int |
LINE_TRACE
|
(package private) char |
lineSeparatorChar
|
(package private) static int |
MISC
|
(package private) static int |
NONE
|
(package private) static int |
NUMBER
|
(package private) static int |
TIME
|
(package private) static int |
TRACE
|
(package private) static int |
VALUES
|
(package private) static int |
WORD
|
Constructor Summary | |
---|---|
TextfileParser()
|
Method Summary | |
---|---|
(package private) void |
checkString(java.io.StreamTokenizer st,
java.lang.String theString)
Error checking routine - makes sure the current token is the string we were expecting |
(package private) void |
checkType(java.io.StreamTokenizer st,
int theType)
Error checking routine - makes sure the current token is of the right type |
protected void |
debugOutput(int outputType,
java.lang.String theOutput)
|
protected void |
debugOutputLn(int outputType,
java.lang.String theOutput)
|
(package private) void |
getAndCheckString(java.io.StreamTokenizer st,
java.lang.String expectedValue)
Gets the next token and ensures that it is the string we were expecting to see |
(package private) java.lang.String |
getName(java.io.StreamTokenizer st)
Returns a "name" from the stream. |
(package private) double |
getNumber(java.io.StreamTokenizer st)
Returns number from the tokenizer. |
(package private) java.lang.String |
getString(java.io.StreamTokenizer st)
Returns String from the tokenizer |
(package private) boolean |
isCurrentToken(java.io.StreamTokenizer st,
java.lang.String tokenString)
Utility method- used to check whether the current token is equal to the given string |
(package private) void |
skip(java.io.StreamTokenizer st,
java.lang.String tokenString,
int skipVals)
Utility routine - gets next token, checks it against our expectation, then skips a given number of tokens. |
(package private) void |
skipUntilString(java.io.StreamTokenizer st,
java.lang.String theString)
Utility method to advance the tokenizer until we see the given string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static int WORD
static int NUMBER
int currentLevel
static final int TRACE
static final int VALUES
static final int MISC
static final int LINE_TRACE
static final int NONE
static final int EXCEPTION
static final int TIME
protected DebugOutput debugPrinter
char lineSeparatorChar
Constructor Detail |
---|
TextfileParser()
Method Detail |
---|
protected void debugOutputLn(int outputType, java.lang.String theOutput)
protected void debugOutput(int outputType, java.lang.String theOutput)
void skipUntilString(java.io.StreamTokenizer st, java.lang.String theString) throws ParsingErrorException
ParsingErrorException
double getNumber(java.io.StreamTokenizer st) throws ParsingErrorException, java.lang.NumberFormatException
ParsingErrorException
java.lang.NumberFormatException
java.lang.String getString(java.io.StreamTokenizer st) throws ParsingErrorException
ParsingErrorException
java.lang.String getName(java.io.StreamTokenizer st) throws ParsingErrorException
ParsingErrorException
void getAndCheckString(java.io.StreamTokenizer st, java.lang.String expectedValue) throws ParsingErrorException
ParsingErrorException
void checkString(java.io.StreamTokenizer st, java.lang.String theString) throws ParsingErrorException
ParsingErrorException
void checkType(java.io.StreamTokenizer st, int theType) throws ParsingErrorException
ParsingErrorException
void skip(java.io.StreamTokenizer st, java.lang.String tokenString, int skipVals) throws ParsingErrorException
ParsingErrorException
boolean isCurrentToken(java.io.StreamTokenizer st, java.lang.String tokenString)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |