TSim
Class TSimStream

java.lang.Object
  |
  +--TSim.TSimStream

public class TSimStream
extends java.lang.Object

Reads text from the given input stream connected to TSim and returns a stream of TSimInformation.


Field Summary
protected  java.io.StreamTokenizer sTokenizer
           
 
Constructor Summary
TSimStream(java.io.InputStream in)
          Creates a new TSimStream that reads from the given InputStream.
 
Method Summary
 TSimInformation read()
          Reads from the input stream and returns a class representing the message from TSim.
protected  int readInt(java.io.StreamTokenizer sTokenizer)
          Help method that reads an integer from the tokenizer and returns it or throws an exception if the next token was not an integer.
protected  java.lang.String readString(java.io.StreamTokenizer sTokenizer)
          Help method that reads a string from the tokenizer and returns it or throws an exception if the next token was not a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sTokenizer

protected java.io.StreamTokenizer sTokenizer
Constructor Detail

TSimStream

public TSimStream(java.io.InputStream in)
Creates a new TSimStream that reads from the given InputStream.
Parameters:
in - the input stream to read text from.
Method Detail

read

public TSimInformation read()
                     throws UnparsableInputException
Reads from the input stream and returns a class representing the message from TSim.
Returns:
 
Throws:
UnparsableInputException - when the input from TSim is not parsable.

readString

protected java.lang.String readString(java.io.StreamTokenizer sTokenizer)
                               throws UnparsableInputException
Help method that reads a string from the tokenizer and returns it or throws an exception if the next token was not a string.
Parameters:
sTokenizer - the stream tokenizer to read from.
Throws:
UnparsableInputException - when the next token was not a string.

readInt

protected int readInt(java.io.StreamTokenizer sTokenizer)
               throws UnparsableInputException
Help method that reads an integer from the tokenizer and returns it or throws an exception if the next token was not an integer.
Parameters:
sTokenizer - the stream tokenizer to read from.
Throws:
UnparsableInputException - when the next token was not an integer.