public abstract int read (byte[] b) throws IOException

Reads into an array of bytes. This method will block until some input is available.

Parameters:
b    the buffer into which the data is read

Returns:  the actual number of bytes read, -1 is returned when the end of the stream is reached.

Exceptions:
IOException    If an I/O error has occurred.