Returns the number of remaining bytes that can be read (or skipped over) from this input stream.
Returns the number of remaining bytes that can be read (or skipped over) from this input stream.
The value returned is count - pos
,
which is the number of bytes remaining to be read from the input buffer.
the number of remaining bytes that can be read (or skipped over) from this input stream without blocking.
Tests if this InputStream
supports mark/reset.
Tests if this InputStream
supports mark/reset. The
markSupported
method of ByteArrayInputStream
always returns true
.
JDK1.1
Reads up to len
bytes of data into an array of bytes
from this input stream.
Reads up to len
bytes of data into an array of bytes
from this input stream.
If pos
equals count
,
then -1
is returned to indicate
end of file. Otherwise, the number k
of bytes read is equal to the smaller of
len
and count-pos
.
If k
is positive, then bytes
buf[pos]
through buf[pos+k-1]
are copied into b[off]
through
b[off+k-1]
in the manner performed
by System.arraycopy
. The
value k
is added into pos
and k
is returned.
This read
method cannot block.
the buffer into which the data is read.
the start offset in the destination array b
the maximum number of bytes read.
the total number of bytes read into the buffer, or
-1
if there is no more data because the end of
the stream has been reached.
If off
is negative,
len
is negative, or len
is greater than
b.length - off
If b
is null
.
Reads the next byte of data from this input stream.
Reads the next byte of data from this input stream. The value
byte is returned as an int
in the range
0
to 255
. If no byte is available
because the end of the stream has been reached, the value
-1
is returned.
This read
method
cannot block.
the next byte of data, or -1
if the end of the
stream has been reached.
Resets the buffer to the marked position.
Resets the buffer to the marked position. The marked position is 0 unless another position was marked or an offset was specified in the constructor.
Skips n
bytes of input from this input stream.
Skips n
bytes of input from this input stream. Fewer
bytes might be skipped if the end of the input stream is reached.
The actual number k
of bytes to be skipped is equal to the smaller
of n
and count-pos
.
The value k
is added into pos
and k
is returned.
the actual number of bytes skipped.
Class use for compatibility with existing blocking java serialization frameworks e.g. Avro.