@Override
    public int read() throws IOException {
        fill();
        if (buffered > position) {
            return 0xff & buffer[position++];
        } else {
            return -1;
        }
    }
@Test
    public void testNullStream() throws IOException {
        InputStream lookahead = new LookaheadInputStream(null, 100);
        assertEquals(-1, lookahead.read());
    }