Package org.moeaframework.util.io
Class CommentedLineReader
java.lang.Object
java.io.Reader
java.io.BufferedReader
org.moeaframework.util.io.CommentedLineReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Readable
Read text from a character-input stream, ignoring lines starting with the
#
character. Lines are only
ignored when using the readLine()
method.-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstructs a buffered reader that ignores commented lines. -
Method Summary
Modifier and TypeMethodDescriptionreadLine()
long
transferTo
(Writer out) static CommentedLineReader
Wraps the given reader in a commented line reader.Methods inherited from class java.io.BufferedReader
close, lines, mark, markSupported, read, read, ready, reset, skip
Methods inherited from class java.io.Reader
nullReader, read, read
-
Constructor Details
-
CommentedLineReader
Constructs a buffered reader that ignores commented lines.- Parameters:
in
- a reader
-
-
Method Details
-
wrap
Wraps the given reader in a commented line reader.- Parameters:
reader
- the reader- Returns:
- the reader wrapped in a commented line reader
-
readLine
- Overrides:
readLine
in classBufferedReader
- Throws:
IOException
-
transferTo
- Overrides:
transferTo
in classReader
- Throws:
IOException
-