MOEA Framework 2.5
API Specification

org.moeaframework.util.io
Class CommentedLineReader

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


Field Summary
 
Fields inherited from class java.io.Reader
lock
 
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.
 
Method Summary
 String readLine()
          Reads a line of text.
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 reader
sz - the input buffer size

CommentedLineReader

public CommentedLineReader(Reader in)
Constructs a buffered reader that ignores lines starting with the # character.

Parameters:
in - a reader
Method Detail

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

MOEA Framework 2.5
API Specification

Copyright 2009-2015 MOEA Framework. All rights reserved.
Licensed under the GNU Lesser General Public License.
Return to the MOEA Framework homepage. Hosted by Get MOEA Framework at SourceForge.net. Fast, secure and Free Open Source software downloads