Examples of readUnsignedShort()


Examples of org.apache.cassandra.io.util.FileDataInput.readUnsignedShort()

                if (v == 0)
                {
                    PositionSize info;
                    if (!input.isEOF())
                    {
                        int utflen = input.readUnsignedShort();
                        if (utflen != input.skipBytes(utflen))
                            throw new EOFException();
                        info = new PositionSize(position, input.readLong() - position);
                    }
                    else
View Full Code Here

Examples of org.apache.derby.iapi.services.io.ArrayInputStream.readUnsignedShort()

    long spare;

    isOverflowPage  =  lrdi.readBoolean();
    setPageStatus    (lrdi.readByte());
    setPageVersion    (lrdi.readLong());
    slotsInUse      =  lrdi.readUnsignedShort();
    nextId          =  lrdi.readInt();
    generation      =  lrdi.readInt();     // page generation (Future Use)
    prevGeneration  =  lrdi.readInt();     // previous generation (Future Use)
    bipLocation     =  lrdi.readLong()// BIPage location (Future Use)
View Full Code Here

Examples of org.apache.qpid.client.message.JMSBytesMessage.readUnsignedShort()

        try
        {
            JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
            bm.writeShort((short)4);
            bm.reset();
            bm.readUnsignedShort();
            // should throw
            bm.readUnsignedShort();
            fail("expected exception did not occur");
        }
        catch (MessageEOFException m)
View Full Code Here

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

    {
        TestDecoder d = createDecoder(getBytes("primitives"));
        assertEquals(true, d.readBoolean());
        assertEquals(false, d.readBoolean());
        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());
View Full Code Here

Examples of org.codehaus.activemq.message.ActiveMQBytesMessage.readUnsignedShort()

  public void testReadUnsignedShort() {
    ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
    try {
      msg.writeShort((short) 3000);
      msg.reset();
      assertTrue(msg.readUnsignedShort() == 3000);
    } catch (JMSException jmsEx) {
      jmsEx.printStackTrace();
      assertTrue(false);
    }
  }
View Full Code Here

Examples of org.jboss.netty.buffer.ChannelBuffer.readUnsignedShort()

    assertEquals(0x00, buffer.readUnsignedByte());
    assertEquals(0x12, buffer.readUnsignedByte());

    assertEquals(0x21, buffer.readUnsignedByte());
    assertEquals(0x1234, buffer.readUnsignedShort());

    assertEquals(0x42, buffer.readUnsignedByte());
    assertEquals(0x12345678, buffer.readInt());

    assertEquals(0x63, buffer.readUnsignedByte());
View Full Code Here

Examples of org.jgroups.util.ByteArrayDataInputStream.readUnsignedShort()

        assert num == -22;
        num=in.readShort();
        assert num == 22;

        in.position(0);
        int val=in.readUnsignedShort();
        assert val == 65514;
        val=in.readUnsignedShort();
        assert val == 22;
    }
View Full Code Here

Examples of org.objectweb.asm.ClassReader.readUnsignedShort()

            return new ClassInfo(this, classNode);
        }
        else {
            // optimized version
            int header = classReader.header;
            int access = classReader.readUnsignedShort(header);

            char[] buf = new char[2048];

            // read super class name
            int superClassIndex = classReader.getItem(classReader.readUnsignedShort(header + 4));
View Full Code Here

Examples of org.pdfclown.bytes.IInputStream.readUnsignedShort()

      int index = 4;
      stream.seek(index);
      byte[] markerBytes = new byte[2];
      while(true)
      {
        index += stream.readUnsignedShort();
        stream.seek(index);

        stream.read(markerBytes);
        index += 2;
View Full Code Here

Examples of org.pdfclown.bytes.IInputStream.readUnsignedShort()

        {
          stream.skip(2);
          // Get the image bits per color component (sample precision)!
          setBitsPerComponent(stream.readUnsignedByte());
          // Get the image size!
          setHeight(stream.readUnsignedShort());
          setWidth(stream.readUnsignedShort());

          break;
        }
      }
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.