class CharReader extends Object
| Modifier and Type | Field and Description |
|---|---|
static char |
EOFCH
A representation of the end of file as a character.
|
| Constructor and Description |
|---|
CharReader(String fileName)
Construct a CharReader from a file name.
|
public static final char EOFCH
public CharReader(String fileName) throws FileNotFoundException
fileName - the name of the input file.FileNotFoundException - if the file is not found.public char nextChar()
throws IOException
IOException - if an I/O error occurs.public int line()
public String fileName()
public void close()
throws IOException
IOException - if an I/O error occurs.