Package com.peterhi.obsolete

Examples of com.peterhi.obsolete.Stream.skipBytes()


  @Test
  public void pSkipBytes_int() throws Exception {
    try {
      Stream stream = new Stream(sampleBytes());
      stream.writeBit(1);
      assertEquals(0, stream.skipBytes(0));
      assertEquals(1, stream.skipBytes(1));
      assertEquals(sampleBytes()[1], (byte )stream.read());
      assertEquals(7, stream.skipBytes(10));
      assertEquals(0, stream.skipBytes(0));
      assertEquals(1, stream.getData().readable());
View Full Code Here


  public void pSkipBytes_int() throws Exception {
    try {
      Stream stream = new Stream(sampleBytes());
      stream.writeBit(1);
      assertEquals(0, stream.skipBytes(0));
      assertEquals(1, stream.skipBytes(1));
      assertEquals(sampleBytes()[1], (byte )stream.read());
      assertEquals(7, stream.skipBytes(10));
      assertEquals(0, stream.skipBytes(0));
      assertEquals(1, stream.getData().readable());
      stream.readBit();
View Full Code Here

      Stream stream = new Stream(sampleBytes());
      stream.writeBit(1);
      assertEquals(0, stream.skipBytes(0));
      assertEquals(1, stream.skipBytes(1));
      assertEquals(sampleBytes()[1], (byte )stream.read());
      assertEquals(7, stream.skipBytes(10));
      assertEquals(0, stream.skipBytes(0));
      assertEquals(1, stream.getData().readable());
      stream.readBit();
      assertEquals(-1, stream.skipBytes(5));
    } finally {
View Full Code Here

      stream.writeBit(1);
      assertEquals(0, stream.skipBytes(0));
      assertEquals(1, stream.skipBytes(1));
      assertEquals(sampleBytes()[1], (byte )stream.read());
      assertEquals(7, stream.skipBytes(10));
      assertEquals(0, stream.skipBytes(0));
      assertEquals(1, stream.getData().readable());
      stream.readBit();
      assertEquals(-1, stream.skipBytes(5));
    } finally {
    }
View Full Code Here

      assertEquals(sampleBytes()[1], (byte )stream.read());
      assertEquals(7, stream.skipBytes(10));
      assertEquals(0, stream.skipBytes(0));
      assertEquals(1, stream.getData().readable());
      stream.readBit();
      assertEquals(-1, stream.skipBytes(5));
    } finally {
    }
  }
 
  @Test
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.