class InMemoryInputStream extends ByteArrayInputStream {

    public final int read() {

        int value;
        if (position >= buffer.length) {
            return -1;
        }
        value  = buffer [position];
        position++;
        return value & 0xff;
    }

    public  InMemoryInputStream(byte[] buffer);

}