public class CommandReader extends BufferedReader
Console.COMMENT_TOKEN
) will be ignored.Constructor and Description |
---|
CommandReader(InputStream inStream)
Creates a new command reader and prepares the input stream
inStream to read commands from the stream. |
CommandReader(String filename)
Creates a new command reader and prepares the command file given
by the filename
filename . |
public CommandReader(String filename) throws FileNotFoundException
filename
.filename
- the filename of the command fileFileNotFoundException
- if the named file does not exist,
is a directory rather than a regular file, or for some other
reason cannot be opened for reading.public CommandReader(InputStream inStream)
inStream
to read commands from the stream.inStream
- the input stream providing the commandspublic String readLine() throws IOException
readLine
in class BufferedReader
IOException