public class BufferedLineReaderInputStreamTest extends TestCase {
public void testBasicOperations() throws Exception {
String text = "ah blahblah";
byte[] b1 = text.getBytes("US-ASCII");
BufferedLineReaderInputStream instream = new BufferedLineReaderInputStream(new ByteArrayInputStream(b1), 4096);
assertEquals((byte)'a', instream.read());
assertEquals((byte)'h', instream.read());
assertEquals((byte)' ', instream.read());
byte[] tmp1 = new byte[4];
assertEquals(4, instream.read(tmp1));
assertEquals(4, instream.read(tmp1));
assertEquals(-1, instream.read(tmp1));
assertEquals(-1, instream.read(tmp1));
assertEquals(-1, instream.read());
assertEquals(-1, instream.read());
}