au.edu.swin.synergy.lib
Class BInputReader
java.lang.Object
|
+--au.edu.swin.synergy.lib.BInputReader
- public class BInputReader
- extends Object
This class will allow calls like read() and readLine()
on the command line input stream.
- Author:
- Tristan Austin
Method Summary |
int |
read()
Reads the next character in the input stream and
returns it as an int. |
String |
readLine()
This will read until it finds a carriage return signfied
by a '\n' or the end of the input stream is reached
at which point an IOException will be thrown. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
BInputReader
public BInputReader(InputStream in)
- Creates a new BInputRead to read from the
stream given.
readLine
public String readLine()
throws IOException
- This will read until it finds a carriage return signfied
by a '\n' or the end of the input stream is reached
at which point an IOException will be thrown.
'\r' characters will be ignored.
- Returns:
- The line read
- Throws:
- IOException - if the end of the input stream is reached
read
public int read()
throws IOException
- Reads the next character in the input stream and
returns it as an int.
- Returns:
- The next character as an int
- Throws:
- IOException - when an io error occurs