Attempts to read enough bytes from the stream to fill the given byte array, with the same behavior as DataInput#readFully(byte[]). Does not close the stream. @param in the input stream to read from. @param b the buffer into which the data is read. @throws EOFException if this stream reaches
(InputStream in, byte[] b)
| 720 | * @throws IOException if an I/O error occurs. |
| 721 | */ |
| 722 | public static void readFully(InputStream in, byte[] b) throws IOException { |
| 723 | readFully(in, b, 0, b.length); |
| 724 | } |
| 725 | |
| 726 | /** |
| 727 | * Attempts to read {@code len} bytes from the stream into the given array starting at |