Examples of readUnsignedInt()


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

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

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

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

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

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

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

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

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

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

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

     
      stream.readBit();
     
      for (NumWithInfo nwi : genNumWithInfos(Integer.SIZE)) {
        long mask = 0xffffffffL;
        assertEquals(nwi.getNumber().longValue() & mask, stream.readUnsignedInt());
      }
     
      assertEquals(1, stream.getData().readable());
    } finally {
    }
View Full Code Here

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

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

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

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

Examples of davaguine.jmac.tools.ByteArrayReader.readUnsignedInt()

        reader.reset(m_pIO, j << 2);
        long l1;
        int i = (int) ((l1 = m_nElements) - nBitArrayIndex);
        if ((long) i < l1)
            do {
                al[i] = reader.readUnsignedInt();
                i++;
            } while ((long) i < l1);

        //adjust the m_Bit pointer
        m_nCurrentBitIndex &= 31;
View Full Code Here

Examples of davaguine.jmac.tools.ByteArrayReader.readUnsignedInt()

        ByteArrayReader reader = m_pReader;
        reader.reset(m_pIO, (int) m_nBytes);
        long al[] = m_pBitArray;
        long l = m_nElements;
        for (int i = 0; i < l; i++)
            al[i] = reader.readUnsignedInt();
    }

    public void GenerateArray(int[] pOutputArray, int nElements) throws IOException {
        GenerateArray(pOutputArray, nElements, -1);
    }
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.