class ByteBufferOutputStream extends OutputStream {

    @Override
    public void write(final int b) {
        // super specifies to ignore everything except the lower 8 bits.
        destinationBuffer.put((byte) b);
    }

      ByteBufferOutputStream(final ByteBuffer destinationBuffer);

}