class ByteBufferInputStream extends InputStream {

    @Override
    public int read()
    {
        return myBuffer.hasRemaining() ? myBuffer.get() & 0xFF : -1;
    }

    public  ByteBufferInputStream(ByteBuffer buffer);

}