Package com.peterhi.obsolete

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


      Data data = new Data();
     
      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++) {
View Full Code Here


      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 {
    }
   
    try {
View Full Code Here

      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 {
    }
   
    try {
      byte[] buffer = new byte[50];
View Full Code Here

      Data data = new Data(buffer);
     
      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++) {
View Full Code Here

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

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

      Data data = new Data(buffer);
     
      assertEquals(32, data.written());
      assertEquals(32, data.readable());
     
      assertEquals(4, data.debug_GetBuffer().length);
      assertEquals(0, data.debug_GetRead());
      assertEquals(32, data.debug_GetWrite());
      assertEquals(RT.EOF, data.debug_GetMark());
     
      BigInteger value = data.read(32, false);
View Full Code Here

      Data data = new Data(buffer, 0, 31, true);
     
      assertEquals(31, data.written());
      assertEquals(31, data.readable());
     
      assertEquals(4, data.debug_GetBuffer().length);
      assertEquals(0, data.debug_GetRead());
      assertEquals(31, data.debug_GetWrite());
      assertEquals(RT.EOF, data.debug_GetMark());
     
      BigInteger value = data.read(31, false);
View Full Code Here

      Data data = new Data(0);

      assertEquals(0, data.written());
      assertEquals(0, data.readable());
     
      assertEquals(0, data.debug_GetBuffer().length);
      assertEquals(0, data.debug_GetRead());
      assertEquals(0, data.debug_GetWrite());
      assertEquals(RT.EOF, data.debug_GetMark());
     
      data.write(value, 32);
View Full Code Here

      data.write(value, 32);

      assertEquals(32, data.written());
      assertEquals(32, data.readable());
     
      assertEquals(128, data.debug_GetBuffer().length);
      assertEquals(0, data.debug_GetRead());
      assertEquals(32, data.debug_GetWrite());
      assertEquals(RT.EOF, data.debug_GetMark());

      assertEquals(Integer.valueOf("01111111", 2).byteValue(), data.debug_GetBuffer()[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.