A buffered character-input stream that keeps track of line numbers. A line
is considered to be terminated by any one of a line feed ('\n'), a carriage
return ('\r'), or a carriage return followed immediately by a linefeed.
Read a line of text. A line is considered to be terminated by any one
of a line feed ('\n'), a carriage return ('\r'), or a carriage return
followed immediately by a linefeed.
Returns:
A String containing the contents of the line, not including
any line-termination characters, or null if the end of the
stream has been reached
mark
public void mark(int readAheadLimit) throws IOException
Mark the present position in the stream. Subsequent calls to reset()
will attempt to reposition the stream to this point, and will also reset
the line number appropriately.
Parameters:
readAheadLimit - Limit on the number of characters that may be
read while still preserving the mark. After
reading this many characters, attempting to
reset the stream may fail.