public class LineNumberReader extends BufferedReader
Constructor and Description |
---|
LineNumberReader(Reader reader) |
LineNumberReader(Reader reader,
int i) |
Modifier and Type | Method and Description |
---|---|
int |
getLineNumber() |
void |
mark(int i)
Marks a position in the buffered stream.
|
int |
read()
Reads a single character.
|
int |
read(char[] ac,
int i,
int j)
Reads characters into part of a character array.
|
String |
readLine()
Returns the next line of text from the stream (blocking).
|
void |
reset()
Resets the buffer pointer.
|
void |
setLineNumber(int i) |
long |
skip(long l)
Skips the specified number of characters in the stream (blocking).
|
close, markSupported, ready, terminated
public LineNumberReader(Reader reader)
reader
- ?public LineNumberReader(Reader reader, int i)
reader
- ?i
- ?public int getLineNumber()
public void mark(int i) throws IOException
BufferedReader
mark
in class BufferedReader
i
- ?IOException
- ?public int read() throws IOException
BufferedReader
read
in class BufferedReader
IOException
- ?public int read(char[] ac, int i, int j) throws IOException
BufferedReader
read
in class BufferedReader
ac
- ?i
- ?j
- ?IOException
- ?public String readLine() throws IOException
BufferedReader
readLine
in class BufferedReader
IOException
- ?public void reset() throws IOException
BufferedReader
reset
in class BufferedReader
IOException
- ?public void setLineNumber(int i)
i
- ?public long skip(long l) throws IOException
BufferedReader
skip
in class BufferedReader
l
- ?IOException
- ?