Examples of readUnsignedByte()


Examples of javax.imageio.stream.MemoryCacheImageInputStream.readUnsignedByte()

        i.seek(0);
        h.check(i.readLong() == 8246096929276181351L);
        i.seek(0);
        h.check(i.readShort() == 29296);
        i.seek(0);
        h.check(i.readUnsignedByte() == 114);
        i.seek(0);
        h.check(i.readUnsignedInt() == 1919944055);
        i.seek(0);
        h.check(i.readUnsignedShort() == 29296);
View Full Code Here

Examples of javax.jms.BytesMessage.readUnsignedByte()

      {
         // OK
      }
      try
      {
         m.readUnsignedByte();
         ProxyAssertSupport.fail();
      }
      catch (javax.jms.MessageNotReadableException e)
      {
         // OK
View Full Code Here

Examples of org.activemq.message.ActiveMQBytesMessage.readUnsignedByte()

  public void testReadUnsignedByte() {
    ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
    try {
      msg.writeByte((byte) 2);
      msg.reset();
      assertTrue(msg.readUnsignedByte() == 2);
    } catch (JMSException jmsEx) {
      jmsEx.printStackTrace();
      assertTrue(false);
    }
  }
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQBytesMessage.readUnsignedByte()

    public void testReadUnsignedByte() {
        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
        try {
            msg.writeByte((byte) 2);
            msg.reset();
            assertTrue(msg.readUnsignedByte() == 2);
        } catch (JMSException jmsEx) {
            jmsEx.printStackTrace();
            assertTrue(false);
        }
    }
View Full Code Here

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

    public void testReadUnsignedByte() throws Exception
    {
        JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
        bm.writeByte((byte) 9);
        bm.reset();
        int result = bm.readUnsignedByte();
        assertEquals(9, result);
    }

    public void testReadUnsignedShort() throws Exception
    {
View Full Code Here

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

    public void testPrimitives() throws IOException
    {
        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());
View Full Code Here

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

  public void testReadUnsignedByte() {
    ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
    try {
      msg.writeByte((byte) 2);
      msg.reset();
      assertTrue(msg.readUnsignedByte() == 2);
    } catch (JMSException jmsEx) {
      jmsEx.printStackTrace();
      assertTrue(false);
    }
  }
View Full Code Here

Examples of org.iq80.leveldb.util.SliceInput.readUnsignedByte()

    }

    public static BlockTrailer readBlockTrailer(Slice slice)
    {
        SliceInput sliceInput = slice.input();
        CompressionType compressionType = CompressionType.getCompressionTypeByPersistentId(sliceInput.readUnsignedByte());
        int crc32c = sliceInput.readInt();
        return new BlockTrailer(compressionType, crc32c);
    }

    public static Slice writeBlockTrailer(BlockTrailer blockTrailer)
View Full Code Here

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

    {
      LOG.error("Null msg received in EventDecoder");
      return msg;
    }
    ChannelBuffer buffer = (ChannelBuffer)msg;
    int opcode = buffer.readUnsignedByte();
    if(Events.LOG_IN == opcode || Events.RECONNECT == opcode){
      buffer.readUnsignedByte();// To read-destroy the protocol version byte.
    }
    return Events.event(buffer, opcode);
  }
View Full Code Here

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

        byte[] bytes={-100, -50, 0, 1, 100, 127};
        for(byte b: bytes)
            out.writeByte(b);
        ByteArrayDataInputStream in=new ByteArrayDataInputStream(out.buffer());
        for(byte b: bytes) {
            int tmp=in.readUnsignedByte();
            assert tmp == (b & 0xff);
        }
    }

    public void testBoolean() throws Exception {
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.