LineReader
, Closeable
, AutoCloseable
, Readable
StringLineReader
public class BufferedLineReader extends LineNumberReader implements LineReader
Constructor | Description |
---|---|
BufferedLineReader(InputStream is) |
|
BufferedLineReader(InputStream is,
int bufferSize) |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
|
static BufferedLineReader |
fromString(String s) |
Returns a
BufferedLineReader that gets its input from a String. |
int |
peek() |
Non-destructive one-character look-ahead.
|
String |
readLine() |
Read a line and remove the line terminator
|
lines, markSupported, ready
getLineNumber, mark, read, read, reset, setLineNumber, skip
getLineNumber
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
read, read, transferTo
public BufferedLineReader(InputStream is)
public BufferedLineReader(InputStream is, int bufferSize)
public static BufferedLineReader fromString(String s)
BufferedLineReader
that gets its input from a String. No charset conversion
is necessary because the String is in unicode.public String readLine()
readLine
in interface LineReader
readLine
in class LineNumberReader
public int peek()
peek
in interface LineReader
public void close()
close
in interface AutoCloseable
close
in interface Closeable
close
in interface LineReader
close
in class BufferedReader