base/common/src/main/com/thesett/common/io/ClientInputStream.java
public int read(byte[] b) throws IOException
    {
        try
        {
            ByteBlock block = source.read(b);

            System.arraycopy(block.data, 0, b, 0, block.count);

            return block.count;
        }
        catch (RemoteException e)
        {
            throw new IOException("There was a Remote Exception.", e);
        }
    }
public int read(byte[] b) throws IOException
    {
        try
        {
            ByteBlock block = source.read(b);

            System.arraycopy(block.data, 0, b, 0, block.count);

            return block.count;
        }
        catch (RemoteException e)
        {
            throw new IOException("There was a Remote Exception.", e);
        }
    }
public int read ( byte [ ] b ) throws IOException { try { ByteBlock block = source . read ( b ) ; System . arraycopy ( block . data , 0 , b , 0 , block . count ) ; return block . count ; } catch ( RemoteException e ) { throw new IOException ( "There was a Remote Exception." , e ) ; } }
Reads some number of bytes from the input stream and stores them into the buffer array b.

@param  b The buffer into which the data is read.

@return The total number of bytes read into the buffer, or -1 is there is no more data because the end of the
stream has been reached.

@throws IOException If an I/O error occurs when accessing the stream or a remote exception occurs.
Reads some number of bytes from the input stream and stores them into the buffer array b .