Examples of goToReadMark()


Examples of com.peterhi.runtime.BitStream.goToReadMark()

    BitStream bs = new BitStream(new byte[] { 1, 2 }, 0, Byte.SIZE * 2);
    assertEquals(1, bs.readBits(8, true).byteValue());
    bs.setReadMark();
    assertEquals(2, bs.readBits(8, true).byteValue());
    assertEquals(-1, bs.readBit());
    bs.goToReadMark();
    assertEquals(2, bs.readBits(8, true).byteValue());
    assertEquals(-1, bs.readBit());
    bs.clearReadMark();
    assertEquals(-1, bs.readBit());
    assertEquals(0, bs.available());
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.