/** * Reads a block of bytes from the underlying stream. This will * read up to the requested number of bytes from the underlying * stream. If there are no ready bytes on the stream this can * return zero, representing the fact that nothing was read. * * @param data this is the array to read the bytes in to * * @return this returns the number of bytes read from the stream */ public int read(byte[] data) throws IOException { return read(data, 0, data.length); }