Package javax.jms

Examples of javax.jms.BytesMessage.readBoolean()


    }

    // Reading should not be possible when message is read-write
    try
    {
      m.readBoolean();
      fail();
    } catch (javax.jms.MessageNotReadableException e)
    {
      // OK
    }
View Full Code Here


    BytesMessage m2 = (BytesMessage) queueConsumer.receive(2000);

    assertNotNull(m2);

    assertEquals(myBool, m2.readBoolean());
    assertEquals(myByte, m2.readByte());
    assertEquals(myShort, m2.readShort());
    assertEquals(myChar, m2.readChar());
    assertEquals(myInt, m2.readInt());
    assertEquals(myLong, m2.readLong());
View Full Code Here

    assertEquals(myBytes[2], bytes2[0]);
    assertEquals(myBytes[3], bytes2[1]);
    assertEquals(myBytes[4], bytes2[2]);

    assertEquals(myBool, m2.readBoolean());
    assertEquals(myByte, m2.readByte());
    assertEquals(myShort, m2.readShort());
    assertEquals(myInt, m2.readInt());
    assertEquals(myLong, m2.readLong());
    assertEquals(myFloat, m2.readFloat(), 0);
View Full Code Here

    assertEquals(-1, ret);

    // Try and read past the end of the stream
    try
    {
      m2.readBoolean();
      fail();
    } catch (MessageEOFException e)
    {
      // OK
    }
View Full Code Here

    m2.reset();

    // test the unsigned reads

    m2.readBoolean();
    int unsignedByte = m2.readUnsignedByte();

    assertEquals((int) (myByte & 0xFF), unsignedByte);

    int unsignedShort = m2.readUnsignedShort();
View Full Code Here

   {
      super.assertEquivalent(m, mode, redelivered);

      BytesMessage bm = (BytesMessage)m;

      assertEquals(true, bm.readBoolean());
      assertEquals((byte)3, bm.readByte());
      byte[] bytes = new byte[3];
      bm.readBytes(bytes);
      assertEquals((byte)4, bytes[0]);
      assertEquals((byte)5, bytes[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.