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

            System.arraycopy(block.data, off, b, off, len);

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

            System.arraycopy(block.data, off, b, off, len);

            return block.count;
        }
        catch (RemoteException e)
        {
            throw new IOException("There was a Remote Exception.", e);
        }
    }
public int read ( byte [ ] b , int off , int len ) throws IOException { try { ByteBlock block = source . read ( b , off , len ) ; System . arraycopy ( block . data , off , b , off , len ) ; return block . count ; } catch ( RemoteException e ) { throw new IOException ( "There was a Remote Exception." , e ) ; } }
Reads up to len bytes of data from the input stream into an array of bytes.

@param  b   The buffer into which the data is read.
@param  off The start offset in array b at which the data is written.
@param  len The maximum number of bytes to 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 IOException occurs in the wrapped distributed input stream or a remote exception
occurs.
Reads up to len bytes of data from the input stream into an array of bytes .