blue.io
Class IN

java.lang.Object
  |
  +--blue.io.IN

public class IN
extends java.lang.Object

Convenience class used to read 'text' from disk files.


Constructor Summary
IN(java.lang.String fileName)
          Create a 'text input stream' and equate it with the file whose name is the given String.
 
Method Summary
 void close()
          Close the file associated with this object.
 boolean done()
          Returns true if the most recent message sent to the receiving object had a "successful" outcome; false if not.
 double read_double()
          Tries to recognize the next token in the input stream as an double; returns it.
 int read_int()
          Tries to recognize the next token in the input stream as an int; returns it.
 java.lang.String readString()
          Tries to recognize the next token in the input stream as a String with no surrounding 'white space'; returns it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IN

public IN(java.lang.String fileName)
Create a 'text input stream' and equate it with the file whose name is the given String.
Parameters:
fileName - the relative or absolute name of the file from which tokens will be formed
Method Detail

done

public boolean done()
Returns true if the most recent message sent to the receiving object had a "successful" outcome; false if not.

read_int

public int read_int()
Tries to recognize the next token in the input stream as an int; returns it.

read_double

public double read_double()
Tries to recognize the next token in the input stream as an double; returns it.

readString

public java.lang.String readString()
Tries to recognize the next token in the input stream as a String with no surrounding 'white space'; returns it.

close

public void close()
Close the file associated with this object.