Reads some bytes from an input
stream and stores them into the buffer
array {@code b}. The number of bytes
read is equal
to the length of {@code b}.
<p>
This method blocks until one of the
following conditions occurs:
<ul>
<li>{@code b.length}
bytes of input data are available, in which
case a normal return is made.
<li>End of
file is detected, in which case an {@code EOFException}
is thrown.
<li>An I/O error occurs, in
which case an {@code IOException} other
than {@code EOFException} is thrown.
</ul>
<p>
If {@code b} is {@code null},
a {@code NullPointerException} is thrown.
If {@code b.length} is zero, then
no bytes are read. Otherwise, the first
byte read is stored into element {@code b[0]},
the next one into {@code b[1]}, and
so on.
If an exception is thrown from
this method, then it may be that some but
not all bytes of {@code b} have been
updated with data from the input stream.
@param b the buffer into which the data is read.
@throws NullPointerException if {@code b} is {@code null}.
@throws EOFException if this stream reaches the end before reading
all the bytes.
@throws IOException if an I/O error occurs.
Reads some bytes from an input stream and stores them into the buffer array {@code b}. The number of bytes read is equal to the length of {@code b}. <p> This method blocks until one of the following conditions occurs: <ul> <li>{@code b.length} bytes of input data are available, in which case a normal return is made.
<li>End of file is detected, in which case an {@code EOFException} is thrown.
<li>An I/O error occurs, in which case an {@code IOException} other than {@code EOFException} is thrown. </ul> <p> If {@code b} is {@code null}, a {@code NullPointerException} is thrown. If {@code b.length} is zero, then no bytes are read. Otherwise, the first byte read is stored into element {@code b[0]}, the next one into {@code b[1]}, and so on. If an exception is thrown from this method, then it may be that some but not all bytes of {@code b} have been updated with data from the input stream.
@param b the buffer into which the data is read. @throws NullPointerException if {@code b} is {@code null}. @throws EOFException if this stream reaches the end before reading all the bytes. @throws IOException if an I/O error occurs.