}
public void testPeek() throws Throwable
{
ByteArrayInputStream bis = new ByteArrayInputStream("test".getBytes());
PeekableInputStream peek = new PeekableInputStream(bis);
TestCase.assertTrue(peek.peek(0)=='t');
TestCase.assertTrue(peek.peek(1)=='e');
TestCase.assertTrue(peek.peek(2)=='s');
TestCase.assertTrue(peek.peek(3)=='t');
TestCase.assertTrue(peek.read()=='t');
TestCase.assertTrue(peek.read()=='e');
TestCase.assertTrue(peek.read()=='s');
TestCase.assertTrue(peek.read()=='t');
}