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

        return new ByteBlock(b, count);
    }
public ByteBlock read(byte[] b, int off, int len) throws IOException
    {
        int count = source.read(b, off, len);

        return new ByteBlock(b, count);
    }
public ByteBlock read ( byte [ ] b , int off , int len ) throws IOException { int count = source . read ( b , off , len ) ; return new ByteBlock ( b , count ) ; }
Reads up to len bytes of data from the input stream into an array of bytes.

@param  b   The byte array to store the results of the read into.
@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 same results as stored in parameter b but wrapped in byte block.

@throws IOException     If an I/O error occurs when accessing the stream.
@throws RemoteException If an RMI error occurs during remote access.
Reads up to len bytes of data from the input stream into an array of bytes .