Buffer di input che estende le funzionalitą del BufferedReader.
Aggiunge i metodi available() e skip(int n) che non sono presenti nel BufferedReader.
Fields inherited from class java.io.Reader
lock
Constructor Summary
InputBuffer(java.io.InputStream in)
Costruisce un nuovo InputBuffer.
Method Summary
int
available()
Returns the number of bytes that can be read (or skipped over) from this input stream
without blocking by the next caller of a method for this input stream.
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.
return 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
Returns the number of bytes that can be read (or skipped over) from this input stream
without blocking by the next caller of a method for this input stream.
The next caller might be the same thread or or another thread.
Returns:
the number of bytes that can be read from this input stream without blocking.
Skips over and discards n bytes of data from this input stream.
The skip method may, for a variety of reasons, end up skipping over some smaller
number of bytes, possibly 0. This may result from any of a number of conditions;
reaching end of file before n bytes have been skipped is only one possibility.
The actual number of bytes skipped is returned. If n is negative, no bytes are skipped.
The skip method of InputStream creates a byte array and then repeatedly reads into
it until n bytes have been read or the end of the stream has been reached.
Subclasses are encouraged to provide a more efficient implementation of this method.