java.lang.Object | +--java.io.InputStream | +--java.io.FilterInputStream | +--java.io.LineNumberInputStream
This class is an input stream filter that provides the added functionality of keeping track of the current line number.
A line is a sequence of bytes ending with a carriage return
character ('\r'), a newline character
('\n'), or a carriage return character followed
immediately by a linefeed character. In all three cases, the line
terminating character(s) are returned as a single newline character.
The line number begins at 0, and is incremented by
1 when a read returns a newline character.
LineNumberReader
| Fields inherited from class java.io.FilterInputStream |
in |
| Constructor Summary | |
LineNumberInputStream
copy-> new LineNumberInputStream( )copy-> <LineNumberInputStream var> = new LineNumberInputStream(<InputStream in>);
|
|
| Method Summary | |
int |
available()
copy-> .available()copy-> <int var>=<LineNumberInputStream>.available();
|
int |
getLineNumber()
copy-> .getLineNumber()copy-> <int var>=<LineNumberInputStream>.getLineNumber();
|
void |
mark(int readlimit)
copy-> .mark( )copy-> <LineNumberInputStream>.mark(<int readlimit>);
|
int |
read()
copy-> .read()copy-> <int var>=<LineNumberInputStream>.read();
|
int |
read(byte[] b,
int off,
int len)
copy-> .read(, , )copy-> <int var>=<LineNumberInputStream>.read(<byte[] b>, <int off>, <int len>);
|
void |
reset()
copy-> .reset()copy-> <LineNumberInputStream>.reset();
|
void |
setLineNumber(int lineNumber)
copy-> .setLineNumber( )copy-> <LineNumberInputStream>.setLineNumber(<int lineNumber>);
|
long |
skip(long n)
copy-> .skip( )copy-> <long var>=<LineNumberInputStream>.skip(<long n>);
|
| Methods inherited from class java.io.FilterInputStream |
close, markSupported, read |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |