public class TSimStream
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.io.StreamTokenizer |
sTokenizer |
Constructor and Description |
---|
TSimStream(java.io.InputStream in)
Creates a new TSimStream that reads from the given InputStream.
|
Modifier and Type | Method and Description |
---|---|
TSimInformation |
read()
Reads from the input stream and returns an object 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.
|
public TSimStream(java.io.InputStream in)
in
- the input stream to read text from.public TSimInformation read() throws UnparsableInputException
UnparsableInputException
- when the input from TSim is not parsable.protected java.lang.String readString(java.io.StreamTokenizer sTokenizer) throws UnparsableInputException
sTokenizer
- the stream tokenizer to read from.UnparsableInputException
- when the next token was not a string.protected int readInt(java.io.StreamTokenizer sTokenizer) throws UnparsableInputException
sTokenizer
- the stream tokenizer to read from.UnparsableInputException
- when the next token was not an integer.