public abstract class LineReader extends Object implements Closeable
Modifier | Constructor and Description |
---|---|
protected |
LineReader(InputStream in)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
static LineReader |
createArrayLineReader(String[] lines)
Returns a LineReader instance that reads lines from an array.
|
static LineReader |
createAsciiLineReader(InputStream in)
Returns a LineReader instance that just uses the lower 7 bits
of each input byte for character values.
|
abstract String |
readLine()
Returns the next non-empty line of text from the input stream.
|
protected LineReader(InputStream in)
in
- underlying input streampublic abstract String readLine() throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public static LineReader createAsciiLineReader(InputStream in)
in
- input streampublic static LineReader createArrayLineReader(String[] lines)
lines
- line arrayCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.