Package com.openinventor.util
Class AsciiStreamReader
- java.lang.Object
-
- java.io.StreamTokenizer
-
- com.openinventor.util.AsciiStreamReader
-
public class AsciiStreamReader extends java.io.StreamTokenizerClass to read specific fields in a stream. Each field is separated from the next by a java whitespace character (see the java.lang.Character doc).
-
-
Constructor Summary
Constructors Constructor Description AsciiStreamReader(java.io.InputStream stream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description floatreadFloat()Return the current token as a float.intreadInt()Return the current token as an integer.floatreadNextFloat()Read the next float in this stream.intreadNextInt()Read the next integer in this stream.java.lang.StringreadNextString()Read the next string in this stream.
-
-
-
Method Detail
-
readNextInt
public int readNextInt() throws java.io.IOException, java.io.EOFExceptionRead the next integer in this stream.- Throws:
java.io.EOFException- is thrown when TT_EOF is encountered instead of TT_NUMBERjava.io.IOException
-
readNextFloat
public float readNextFloat() throws java.io.IOException, java.io.EOFExceptionRead the next float in this stream.- Throws:
java.io.EOFException- is thrown when TT_EOF is encountered instead of TT_NUMBERjava.io.IOException
-
readNextString
public java.lang.String readNextString() throws java.io.IOException, java.io.EOFExceptionRead the next string in this stream.- Throws:
java.io.EOFException- is thrown when TT_EOF is encountered instead of TT_WORDjava.io.IOException
-
readInt
public int readInt()
Return the current token as an integer.
-
readFloat
public float readFloat()
Return the current token as a float.
-
-