Package jminusminus
Class CharReader
java.lang.Object
jminusminus.CharReader
A buffered character reader, which abstracts out differences between platforms, mapping all new
 lines to '\n', and also keeps track of line numbers.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Field Details- 
EOFCHpublic static final char EOFCH- See Also:
 
 
- 
- 
Constructor Details- 
CharReaderConstructs a CharReader from a file name.- Parameters:
- fileName- the name of the input file.
- Throws:
- FileNotFoundException- if the file is not found.
 
 
- 
- 
Method Details- 
nextCharScans and returns the next character.- Returns:
- the character scanned.
- Throws:
- IOException- if an I/O error occurs.
 
- 
linepublic int line()Returns the current line number in the source file.- Returns:
- the current line number in the source file.
 
- 
fileNameReturns the file name.- Returns:
- the file name.
 
- 
closeCloses the file.- Throws:
- IOException- if an I/O error occurs.
 
 
-