readfully
readfully (byte[] b)
Throws IOException
Reads some bytes from a input stream and stores them into the buffer array B. The number of bytes read is equal to the length of B.
This method blocks until one of the following conditions occurs:
B.length bytes of input data is available, with which case a normal return is made. End of file is detected, in which case an eofexception is thrown. An I/O error occurs, in which case a ioexception other than Eofexception is thrown.
If B is null, a nullpointerexception is thrown. Ifb.length is zero and then no bytes is read. Otherwise, the first byte read is stored to elementb[0], the next one into b[1], and so on. If an exception was thrown from the This method, then it could be, some and not all bytes ofb had been updated with data fro M the input stream.
Parameters: b-the buffer into which, the data is read. Throws: Eofexception-if This stream reaches the end before reading all the bytes. Ioexception-if an I/O error occurs.
Also a little parameter off to note: Off is the offset that represents the starting position of the destination byte array
void |
readfully (byte[] B, int off, int len) Read the Len bit from the stream and save it to B (starting from the index off). |