Package com.peterhi.runtime

Examples of com.peterhi.runtime.Buffer.alignRead()


   
    // 0000000[1 000000]01
    assertEquals(0, testBuffer.read());
   
    // 0000000[1 ]00000001
    assertEquals(6, testBuffer.alignRead());
   
    // 0000000[1 ]00000001
    assertEquals(0, testBuffer.alignRead());
   
    // 0000000[]1 00000001
View Full Code Here


   
    // 0000000[1 ]00000001
    assertEquals(6, testBuffer.alignRead());
   
    // 0000000[1 ]00000001
    assertEquals(0, testBuffer.alignRead());
   
    // 0000000[]1 00000001
    assertEquals(1, testBuffer.read());

    // 0000000[]1 00000001 ==> EOF
View Full Code Here

    // 0000000[]1 00000001 ==> EOF
    assertEquals(-1, testBuffer.read());
   
    // 0000000[]1 00000001 ==> ERR: ']' cannot go beyond '['
    assertEquals(-1, testBuffer.alignRead());
  }
 
  @Test
  public void testToByteArray() throws Exception {
    {
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.