Examples of readUnsignedLong()


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

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

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

    }
   
    try {
      Stream stream = new Stream();
      stream.write(new byte[7]);
      stream.readUnsignedLong();
      fail();
    } catch (InsufficientBufferException ex) {
    } finally {
    }
  }
View Full Code Here

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

      stream.readBit();
     
      for (NumWithInfo nwi : genNumWithInfos(Long.SIZE)) {
        BigInteger mask = BigInteger.valueOf(2).pow(nwi.getBits()).subtract(BigInteger.ONE);
        BigInteger left = nwi.getNumber();
        BigInteger right = stream.readUnsignedLong(nwi.getBits());
       
        left = left.and(mask);
       
        assertEquals(left, right);
      }
View Full Code Here

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

 
  @Test
  public void fReadUnsignedLong_int() throws Exception {
    try {
      Stream stream = new Stream();
      stream.readUnsignedLong(1);
      fail();
    } catch (EOFException ex) {
    } finally {
    }
   
View Full Code Here

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

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

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

    }
   
    try {
      Stream stream = new Stream();
      stream.write(new byte[7]);
      stream.readUnsignedLong(64);
      fail();
    } catch (InsufficientBufferException ex) {
    } finally {
    }
  }
View Full Code Here

Examples of org.apache.qpid.proton.TestDecoder.readUnsignedLong()

        assertEquals(d.readUnsignedByte().intValue(), 42);
        assertEquals(42, d.readUnsignedShort().intValue());
        assertEquals(-42, d.readShort().intValue());
        assertEquals(12345, d.readUnsignedInteger().intValue());
        assertEquals(-12345, d.readInteger().intValue());
        assertEquals(12345, d.readUnsignedLong().longValue());
        assertEquals(-12345, d.readLong().longValue());
        assertEquals(0.125, d.readFloat().floatValue(), 0e-10);
        assertEquals(0.125, d.readDouble().doubleValue(), 0e-10);
    }
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.