org.moeaframework.util.io
Class CommentedLineReader
java.lang.Object
java.io.Reader
java.io.BufferedReader
org.moeaframework.util.io.CommentedLineReader
All Implemented Interfaces: Closeable , Readable
public class CommentedLineReader extends BufferedReader
Read text from a character-input stream, ignoring lines starting with the #
character. Lines are only ignored when using the readLine() method.
Constructor Summary
CommentedLineReader (Reader in)
Constructs a buffered reader that ignores lines starting with the #
character.
CommentedLineReader (Reader in,
int sz)
Constructs a buffered reader that ignores lines starting with the #
character with the specified input buffer size.
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
CommentedLineReader
public CommentedLineReader (Reader in,
int sz)
Constructs a buffered reader that ignores lines starting with the #
character with the specified input buffer size.
Parameters: in - a readersz - the input buffer size
CommentedLineReader
public CommentedLineReader (Reader in)
Constructs a buffered reader that ignores lines starting with the #
character.
Parameters: in - a reader
readLine
public String readLine ()
throws IOException
Description copied from class: java.io.BufferedReader
Reads a line of text. A line is considered to be terminated by any one
of a line feed ('\n'), a carriage return ('\r'), or a carriage return
followed immediately by a linefeed.
Overrides: readLine in class BufferedReader
Returns: A String containing the contents of the line, not including
any line-termination characters, or null if the end of the
stream has been reached
Throws:
IOException - If an I/O error occurs
Copyright 2009-2015 MOEA Framework. All rights reserved. Licensed under the GNU Lesser General Public License . Return to the MOEA Framework homepage . Hosted by