Examples of writeBit()


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

    } catch (EOFException ex) {
    }
   
    try {
      Stream stream = new Stream();
      stream.writeBit(1);
      stream.readLine();
      fail();
    } catch (InsufficientBufferException ex) {
    }
   
View Full Code Here

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

 
  @Test
  public void pReadUnsignedVarLong_void() throws Exception {
    try {
      Stream stream = new Stream();
      stream.writeBit(1);
     
      int max = (int )(Math.pow(2, RT.INT62) * Byte.SIZE - 2);
     
      for (NumWithInfo nwi : genNumWithInfos(max)) {
        if (nwi.getBits() < max) {
View Full Code Here

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

        }
       
        stream.writeUnsignedVarLong(nwi.getNumber().longValue());
      }
     
      stream.writeBit(1);
     
      stream.readBit();
     
      for (NumWithInfo nwi : genNumWithInfos(max)) {
        if (nwi.getBits() < max) {
View Full Code Here

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

    } finally {
    }
   
    try {
      Stream stream = new Stream();
      stream.writeBit(1);
      stream.readUnsignedVarLong();
      fail();
    } catch (InsufficientBufferException ex) {
    } finally {
    }
View Full Code Here

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

    } finally {
    }
   
    try {
      Stream stream = new Stream();
      stream.writeBit(2);
      stream.readUnsignedVarLong();
      fail();
    } catch (InsufficientBufferException ex) {
    } finally {
    }
View Full Code Here

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

    } finally {
    }
   
    try {
      Stream stream = new Stream();
      stream.writeBit(1);
      stream.writeBit(1);
      stream.write(1);
      stream.readUnsignedVarLong();
      fail();
    } catch (InsufficientBufferException ex) {
View Full Code Here

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

    }
   
    try {
      Stream stream = new Stream();
      stream.writeBit(1);
      stream.writeBit(1);
      stream.write(1);
      stream.readUnsignedVarLong();
      fail();
    } catch (InsufficientBufferException ex) {
    } finally {
View Full Code Here

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

 
  @Test
  public void pReadBigInteger_void() throws Exception {
    try {
      Stream stream = new Stream();
      stream.writeBit(1);
     
      for (NumWithInfo nwi : genNumWithInfos(128)) {
        stream.writeBigInteger(nwi.getNumber());
      }
     
View Full Code Here

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

     
      for (NumWithInfo nwi : genNumWithInfos(128)) {
        stream.writeBigInteger(nwi.getNumber());
      }
     
      stream.writeBit(1);
      stream.readBit();
     
      for (NumWithInfo nwi : genNumWithInfos(128)) {
        assertEquals(nwi.getNumber(), stream.readBigInteger());
      }
View Full Code Here

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

    } catch (EOFException ex) {
    }
   
    try {
      Stream stream = new Stream();
      stream.writeBit(1);
      stream.readBigInteger();
      fail();
    } catch (InsufficientBufferException ex) {
    }
   
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.