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
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic static LineReader createAsciiLineReader(InputStream in)
in - input streampublic static LineReader createArrayLineReader(String[] lines)
lines - line arrayCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.