sun.com/bugdatabase/view_bug.do?bug_id=6222822">bug 6222822; don't be fooled by the “closed, fixed” label), this class peeks at the underlying stream and if it is {@link System#in} it usesrepeated reads instead of calling {@link InputStream#skip(long)} on the underlying stream; moreover,skips and reads are tried alternately, so to guarantee that skipping less bytes than requested can be caused only by reaching the end of file.
This class keeps also track of the number of bytes read so far, so to be able to implemented {@link MeasurableStream#position()}independently of underlying input stream.
This class has limited support for {@linkplain #readLine(byte[],int,int,EnumSet) “reading a line”}(whatever that means) from the underlying input stream. You can choose the set of {@linkplain FastBufferedInputStream.LineTerminator line terminators} thatdelimit lines.
Warning: Since fastutil
6.0.0, this class detects a implementations of {@link MeasurableStream} instead of subclasses MeasurableInputStream
(which is deprecated).
@since 4.4