Package com.peterhi.obsolete

Examples of com.peterhi.obsolete.Data.debug_GetRead()


        Integer.valueOf("01010101", 2).byteValue()
      });
     
      assertEquals(0, data.debug_GetRead());
      int a = data.peek();
      assertEquals(0, data.debug_GetRead());
      int b = data.read();
      assertEquals(1, data.debug_GetRead());
      assertEquals(1, a);
      assertEquals(1, b);
      assertEquals(7, data.readable());
View Full Code Here


     
      assertEquals(0, data.debug_GetRead());
      int a = data.peek();
      assertEquals(0, data.debug_GetRead());
      int b = data.read();
      assertEquals(1, data.debug_GetRead());
      assertEquals(1, a);
      assertEquals(1, b);
      assertEquals(7, data.readable());
      data.skip(7);
      assertEquals(-1, data.peek());
View Full Code Here

    try {
      Data data = new Data(new byte[] {
        Integer.valueOf("01010101", 2).byteValue()
      });
     
      assertEquals(0, data.debug_GetRead());
      boolean a = data.peek2();
      assertEquals(0, data.debug_GetRead());
      boolean b = data.read2();
      assertEquals(1, data.debug_GetRead());
      assertEquals(true, a);
View Full Code Here

        Integer.valueOf("01010101", 2).byteValue()
      });
     
      assertEquals(0, data.debug_GetRead());
      boolean a = data.peek2();
      assertEquals(0, data.debug_GetRead());
      boolean b = data.read2();
      assertEquals(1, data.debug_GetRead());
      assertEquals(true, a);
      assertEquals(true, b);
      assertEquals(7, data.readable());
View Full Code Here

     
      assertEquals(0, data.debug_GetRead());
      boolean a = data.peek2();
      assertEquals(0, data.debug_GetRead());
      boolean b = data.read2();
      assertEquals(1, data.debug_GetRead());
      assertEquals(true, a);
      assertEquals(true, b);
      assertEquals(7, data.readable());
      data.skip(7);
      assertEquals(0, data.readable());
View Full Code Here

     
      assertEquals(0, data.written());
      assertEquals(0, data.readable());
     
      assertEquals(512, data.debug_GetBuffer().length);
      assertEquals(0, data.debug_GetRead());
      assertEquals(0, data.debug_GetWrite());
      assertEquals(RT.EOF, data.debug_GetMark());
     
      for (int i = 0; i < 8; i++) {
        data.write2(i % 2 == 0);
View Full Code Here

        data.write2(i % 2 == 0);
      }
     
      assertEquals(8, data.written());
      assertEquals(8, data.readable());
      assertEquals(0, data.debug_GetRead());
      assertEquals(8, data.debug_GetWrite());
     
      for (int i = 0; i < 8; i++) {
        data.write2(i % 2 != 0);
      }
View Full Code Here

        data.write2(i % 2 != 0);
      }
     
      assertEquals(16, data.written());
      assertEquals(16, data.readable());
      assertEquals(0, data.debug_GetRead());
      assertEquals(16, data.debug_GetWrite());
     
      assertEquals(Integer.valueOf("01010101", 2).byteValue(), data.debug_GetBuffer()[0]);
      assertEquals(Integer.valueOf("10101010", 2).byteValue(), data.debug_GetBuffer()[1]);
    } finally {
View Full Code Here

     
      assertEquals(400, data.written());
      assertEquals(400, data.readable());
     
      assertEquals(50, data.debug_GetBuffer().length);
      assertEquals(0, data.debug_GetRead());
      assertEquals(400, data.debug_GetWrite());
      assertEquals(RT.EOF, data.debug_GetMark());
     
      for (int i = 0; i < 8; i++) {
        data.write2(i % 2 == 0);
View Full Code Here

      }
     
      assertEquals(178, data.debug_GetBuffer().length);
      assertEquals(408, data.written());
      assertEquals(408, data.readable());
      assertEquals(0, data.debug_GetRead());
      assertEquals(408, data.debug_GetWrite());
     
      for (int i = 0; i < 8; i++) {
        data.write2(i % 2 != 0);
      }
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.