com.sun.j3d.loaders.objectfile
Class ObjectFileParser

java.lang.Object
  extended by java.io.StreamTokenizer
      extended by com.sun.j3d.loaders.objectfile.ObjectFileParser

 class ObjectFileParser
extends java.io.StreamTokenizer


Field Summary
private static char BACKSLASH
           
 
Fields inherited from class java.io.StreamTokenizer
nval, sval, TT_EOF, TT_EOL, TT_NUMBER, TT_WORD, ttype
 
Constructor Summary
ObjectFileParser(java.io.Reader r)
           
 
Method Summary
(package private)  void getNumber()
          getNumber Gets a number from the stream.
(package private)  void getToken()
          getToken Gets the next token from the stream.
(package private)  void printToken()
           
(package private)  void setup()
          setup Sets up StreamTokenizer for reading ViewPoint .obj file format.
(package private)  void skipToNextLine()
          skipToNextLine Skips all tokens on the rest of this line.
 
Methods inherited from class java.io.StreamTokenizer
commentChar, eolIsSignificant, lineno, lowerCaseMode, nextToken, ordinaryChar, ordinaryChars, parseNumbers, pushBack, quoteChar, resetSyntax, slashSlashComments, slashStarComments, toString, whitespaceChars, wordChars
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BACKSLASH

private static final char BACKSLASH
See Also:
Constant Field Values
Constructor Detail

ObjectFileParser

ObjectFileParser(java.io.Reader r)
Method Detail

setup

void setup()
setup Sets up StreamTokenizer for reading ViewPoint .obj file format.


getToken

void getToken()
        throws ParsingErrorException
getToken Gets the next token from the stream. Puts one of the four constants (TT_WORD, TT_NUMBER, TT_EOL, or TT_EOF) or the token value for single character tokens into ttype. Handles backslash continuation of lines.

Throws:
ParsingErrorException

printToken

void printToken()

skipToNextLine

void skipToNextLine()
              throws ParsingErrorException
skipToNextLine Skips all tokens on the rest of this line. Doesn't do anything if We're already at the end of a line

Throws:
ParsingErrorException

getNumber

void getNumber()
         throws ParsingErrorException
getNumber Gets a number from the stream. Note that we don't recognize numbers in the tokenizer automatically because numbers might be in scientific notation, which isn't processed correctly by StreamTokenizer. The number is returned in nval.

Throws:
ParsingErrorException


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.