fc.io
Class CommentedFileReader

java.lang.Object
  extended by java.io.Reader
      extended by java.io.BufferedReader
          extended by 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.


Constructor Summary
CommentedFileReader(File f)
          Reads from the specified file, using UTF-8 encoding.
CommentedFileReader(Reader r)
          Reads from the specified Reader
 
Method Summary
static void main(String[] args)
           
 String readLine()
           
 
Methods inherited from class java.io.BufferedReader
close, mark, markSupported, read, read, ready, reset, skip
 
Methods inherited from class java.io.Reader
read, read
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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
Method Detail

readLine

public String readLine()
                throws IOException
Overrides:
readLine in class BufferedReader
Throws:
IOException

main

public static void main(String[] args)
                 throws IOException
Throws:
IOException