Class iicm.vrml.pw.StrTokenizer
All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class iicm.vrml.pw.StrTokenizer
java.lang.Object
   |
   +----iicm.vrml.pw.StrTokenizer
  -  public class StrTokenizer
  -  extends Object
StrTokenizer - read VRML stream tokens
Copyright (c) 1997 IICM
   
  -   StrTokenizer(InputStream) StrTokenizer(InputStream)
-  construct a StrTokenizer for an InputStream.
   
  -   eof() eof()
-  return flag whether end of file was reached
  
-   lineno() lineno()
-  current line number
  
-   nextChar() nextChar()
-  look at next character without reading a new one.
  
-   putbackString(String) putbackString(String)
-  put back a String.
  
-   readChar() readChar()
-  read a character (skips whitespace and comments)
  
-   readFloatValue() readFloatValue()
-  read a floating point number.
  
-   readIdentifier() readIdentifier()
-  read an identifier String (skips whitespace and comments)
  
-   readIntValue() readIntValue()
-  read an integer.
  
-   readLine(char[]) readLine(char[])
-  read a whole line (until \r or \n) into a char[] buffer.
  
-   readQuotedString() readQuotedString()
-  read a quoted String ("...").
  
-   skipComment() skipComment()
-  skip any amount of whitspace or comment.
   
 StrTokenizer
StrTokenizer
  public StrTokenizer(InputStream is)
  -  construct a StrTokenizer for an InputStream.
StrTokenizer does buffering on the input stream.
current implementation blocks to read first character from stream
   
 eof
eof
  public boolean eof()
  -  return flag whether end of file was reached
 lineno
lineno
  public int lineno()
  -  current line number
 nextChar
nextChar
  public int nextChar()
  -  look at next character without reading a new one.
returns -1 on eof
  
    -  See Also:
    
-  skipComment
  
 
 skipComment
skipComment
  public void skipComment() throws IOException
  -  skip any amount of whitspace or comment.
called by all read operations
 readLine
readLine
  public int readLine(char buf[]) throws IOException
  -  read a whole line (until \r or \n) into a char[] buffer.
if the line is longer than the buffer, the rest is skipped.
the newline character is not appended to the buffer
  
    -  Returns:
    
-  the no. of chars written into buf
  
 
 readChar
readChar
  public int readChar() throws IOException
  -  read a character (skips whitespace and comments)
  
    -  Returns:
    
-  character or -1 on EOF
  
 
 readIdentifier
readIdentifier
  public String readIdentifier() throws IOException
  -  read an identifier String (skips whitespace and comments)
  
    -  Returns:
    
-  null if no identifier could be read or non-zero length identifier string
  
 
 readQuotedString
readQuotedString
  public String readQuotedString() throws IOException
  -  read a quoted String ("...").
the quotes themselves are not part of the String returned.
returns empty string if next char is not '"'
 readIntValue
readIntValue
  public int readIntValue() throws IOException
  -  read an integer. format: [+-][0-9]* or [+-]0x[0-9A-Fa-f]*
 readFloatValue
readFloatValue
  public double readFloatValue() throws IOException
  -  read a floating point number. format: [+-][0-9]*{[.][0-9]*}{[Ee][+-][0-9]*}
 putbackString
putbackString
  public void putbackString(String s)
  -  put back a String.
In order to not further slow down reading of numbers, their
string representation is not remembered by this class
All Packages  Class Hierarchy  This Package  Previous  Next  Index