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

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

        return new ByteBlock(b, count);
    }
Reads some number of bytes from the input stream and stores them into the buffer array b. The bytes are also
returned wrapped in a byte block so that they can be returnd over RMI.

@param  b The byte array to store the results of the read into.

@return The same results 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.