Package com.peterhi.obsolete

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


     
      for (NumWithInfo nwi : genNumWithInfos(Long.SIZE)) {
        stream.writeLong(nwi.getNumber().longValue());
      }
     
      stream.writeBit(1);
     
      stream.readBit();
     
      for (NumWithInfo nwi : genNumWithInfos(Long.SIZE)) {
        BigInteger mask = BigInteger.valueOf(2).pow(Long.SIZE).subtract(BigInteger.ONE);
View Full Code Here


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

 
  @Test
  public void pReadLong_int() throws Exception {
    try {
      Stream stream = new Stream();
      stream.writeBit(1);
     
      for (NumWithInfo nwi : genNumWithInfos(Long.SIZE)) {
        stream.writeLong(nwi.getNumber().longValue(), nwi.getBits());
      }
     
View Full Code Here

     
      for (NumWithInfo nwi : genNumWithInfos(Long.SIZE)) {
        stream.writeLong(nwi.getNumber().longValue(), nwi.getBits());
      }
     
      stream.writeBit(1);
     
      stream.readBit();
     
      for (NumWithInfo nwi : genNumWithInfos(Long.SIZE)) {
        if (nwi.isNormal()) {
View Full Code Here

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

 
  @Test
  public void pReadUnsignedLong_int() throws Exception {
    try {
      Stream stream = new Stream();
      stream.writeBit(1);
     
      for (NumWithInfo nwi : genNumWithInfos(Long.SIZE)) {
        stream.writeLong(nwi.getNumber().longValue(), nwi.getBits());
      }
     
View Full Code Here

     
      for (NumWithInfo nwi : genNumWithInfos(Long.SIZE)) {
        stream.writeLong(nwi.getNumber().longValue(), nwi.getBits());
      }
     
      stream.writeBit(1);
     
      stream.readBit();
     
      for (NumWithInfo nwi : genNumWithInfos(Long.SIZE)) {
        BigInteger mask = BigInteger.valueOf(2).pow(nwi.getBits()).subtract(BigInteger.ONE);
View Full Code Here

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

 
  @Test
  public void pReadVarLong_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

        }
       
        stream.writeVarLong(nwi.getNumber().longValue());
      }
     
      stream.writeBit(1);
     
      stream.readBit();
     
      for (NumWithInfo nwi : genNumWithInfos(max)) {
        if (nwi.getBits() < max) {
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.