Package com.peterhi.obsolete

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


  public void pMark_int() throws Exception {
    try {
      int whatever = 672695543;
      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());
View Full Code Here


      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());
      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.