Package com.openinventor.util
Class AsciiStreamReader
- java.lang.Object
-
- java.io.StreamTokenizer
-
- com.openinventor.util.AsciiStreamReader
-
public class AsciiStreamReader extends java.io.StreamTokenizer
Class 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 float
readFloat()
Return the current token as a float.int
readInt()
Return the current token as an integer.float
readNextFloat()
Read the next float in this stream.int
readNextInt()
Read the next integer in this stream.java.lang.String
readNextString()
Read the next string in this stream.
-
-
-
Method Detail
-
readNextInt
public int readNextInt() throws java.io.IOException, java.io.EOFException
Read 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.EOFException
Read 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.EOFException
Read 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.
-
-