Reads a specified number of bytes from this stream into an array starting at a specified position.
public int read( byte[] buffer, int index, int count )
buffer
The byte array to read data into.
index
The starting index in the buffer.
count
The number of bytes to read.
Returns the total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes aren't currently available, or it can be zero if the end of the stream is reached.
IOException thrown if an I/O error occurs or if the stream does not support reading.
Retrieves the actual number of bytes read. If the read operation is successful, the current position of the stream is advanced by the number of bytes read.
See Also write