Package com.peterhi.obsolete

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


      Stream stream = new Stream(sampleBytes());
      assertEquals(sampleBytes()[0], (byte )stream.read());
      stream.mark(whatever);
      assertEquals(sampleBytes()[1], (byte )stream.read());
      assertEquals(sampleBytes()[2], (byte )stream.read());
      stream.reset();
      assertEquals(sampleBytes()[1], (byte )stream.read());
      assertEquals(7, stream.available());
    } finally {
    }
  }
View Full Code Here


  public void pReset_void() throws Exception {
    try {
      int whatever = 546543324;
      Stream stream = new Stream(sampleBytes());
      assertEquals(sampleBytes()[0], (byte )stream.read());
      stream.reset();
      assertEquals(sampleBytes()[1], (byte )stream.read());
      stream.mark(whatever);
      assertEquals(sampleBytes()[2], (byte )stream.read());
      stream.reset();
      assertEquals(sampleBytes()[2], (byte )stream.read());
View Full Code Here

      assertEquals(sampleBytes()[0], (byte )stream.read());
      stream.reset();
      assertEquals(sampleBytes()[1], (byte )stream.read());
      stream.mark(whatever);
      assertEquals(sampleBytes()[2], (byte )stream.read());
      stream.reset();
      assertEquals(sampleBytes()[2], (byte )stream.read());
      assertEquals(6, stream.available());
    } finally {
    }
  }
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.