Class AsciiStreamReader

java.lang.Object
java.io.StreamTokenizer
com.openinventor.util.AsciiStreamReader

public class AsciiStreamReader extends 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 Details

    • AsciiStreamReader

      public AsciiStreamReader(InputStream stream)
  • Method Details

    • readNextInt

      public int readNextInt() throws IOException, EOFException
      Read the next integer in this stream.
      Throws:
      EOFException - is thrown when TT_EOF is encountered instead of TT_NUMBER
      IOException
    • readNextFloat

      public float readNextFloat() throws IOException, EOFException
      Read the next float in this stream.
      Throws:
      EOFException - is thrown when TT_EOF is encountered instead of TT_NUMBER
      IOException
    • readNextString

      public String readNextString() throws IOException, EOFException
      Read the next string in this stream.
      Throws:
      EOFException - is thrown when TT_EOF is encountered instead of TT_WORD
      IOException
    • readInt

      public int readInt()
      Return the current token as an integer.
    • readFloat

      public float readFloat()
      Return the current token as a float.