@Test public void testBasicOperations() throws Exception { String text = "ah blahblah"; LineReaderInputStreamAdaptor instream = create(text); Assert.assertEquals((byte) 'a', instream.read()); Assert.assertEquals((byte) 'h', instream.read()); Assert.assertEquals((byte) ' ', instream.read()); byte[] tmp1 = new byte[4]; Assert.assertEquals(4, instream.read(tmp1)); Assert.assertEquals(4, instream.read(tmp1)); Assert.assertEquals(-1, instream.read(tmp1)); Assert.assertEquals(-1, instream.read(tmp1)); Assert.assertEquals(-1, instream.read()); Assert.assertEquals(-1, instream.read()); instream.close(); }
@Override public int read() throws IOException { int i = in.read(); this.eof = i == -1; this.used = true; return i; }
LineReaderInputStreamAdaptor extends LineReaderInputStream { @Override public int read() throws IOException { int i = in.read(); this.eof = i == -1; this.used = true; return i; } }
LineReaderInputStreamAdaptor extends LineReaderInputStream { @Override public int read() throws IOException { int i = in.read(); this.eof = i == -1; this.used = true; return i; } LineReaderInputStreamAdaptor(
            final InputStream is,
            int maxLineLen);  LineReaderInputStreamAdaptor(
            final InputStream is); }
LineReaderInputStreamAdaptor extends LineReaderInputStream { @Override public int read() throws IOException { int i = in.read(); this.eof = i == -1; this.used = true; return i; } LineReaderInputStreamAdaptor(
            final InputStream is,
            int maxLineLen);  LineReaderInputStreamAdaptor(
            final InputStream is); @Override int read(); @Override int read(byte[] b, int off, int len); @Override int readLine(final ByteArrayBuffer dst); boolean eof(); boolean isUsed(); @Override String toString(); @Override boolean unread(ByteArrayBuffer buf); @Override long skip(long count); }
LineReaderInputStreamAdaptor extends LineReaderInputStream { @Override public int read() throws IOException { int i = in.read(); this.eof = i == -1; this.used = true; return i; } LineReaderInputStreamAdaptor(
            final InputStream is,
            int maxLineLen);  LineReaderInputStreamAdaptor(
            final InputStream is); @Override int read(); @Override int read(byte[] b, int off, int len); @Override int readLine(final ByteArrayBuffer dst); boolean eof(); boolean isUsed(); @Override String toString(); @Override boolean unread(ByteArrayBuffer buf); @Override long skip(long count);  }