fc.io
Class CommentedFileReader
java.lang.Object
java.io.Reader
java.io.BufferedReader
fc.io.CommentedFileReader
- All Implemented Interfaces:
- Closeable, Readable
public class CommentedFileReader
- extends BufferedReader
Extends the readLine functionality of BufferedReader by ignoring
any commented and empty lines.
- comments start with hash or //
- empty lines consist of only 0 or more whitespace
CommentedFileReader
public CommentedFileReader(Reader r)
throws IOException
- Reads from the specified Reader
- Throws:
IOException - on error reading from the file
CommentedFileReader
public CommentedFileReader(File f)
throws IOException
- Reads from the specified file, using UTF-8 encoding.
- Throws:
IOException - on error reading from the file
readLine
public String readLine()
throws IOException
- Overrides:
readLine in class BufferedReader
- Throws:
IOException
main
public static void main(String[] args)
throws IOException
- Throws:
IOException