Package javax.jms

Examples of javax.jms.StreamMessage.readBoolean()


      ProxyAssertSupport.assertEquals(-1, ret);

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


      }

      m2.reset();

      // check we go back to the beginning
      ProxyAssertSupport.assertEquals(myBool, m2.readBoolean());
      ProxyAssertSupport.assertEquals(myByte, m2.readByte());
      ProxyAssertSupport.assertEquals(myShort, m2.readShort());
      ProxyAssertSupport.assertEquals(myChar, m2.readChar());
      ProxyAssertSupport.assertEquals(myInt, m2.readInt());
      ProxyAssertSupport.assertEquals(myLong, m2.readLong());
View Full Code Here

      m2.clearBody();

      try
      {
         // Should now be write only
         m2.readBoolean();
         ProxyAssertSupport.fail();
      }
      catch (MessageNotReadableException e)
      {
      }
View Full Code Here

      m2.writeBoolean(myBool);

      m2.reset();

      ProxyAssertSupport.assertEquals(myBool, m2.readBoolean());
      try
      {
         m2.readBoolean();
         ProxyAssertSupport.fail();
      }
View Full Code Here

      m2.reset();

      ProxyAssertSupport.assertEquals(myBool, m2.readBoolean());
      try
      {
         m2.readBoolean();
         ProxyAssertSupport.fail();
      }
      catch (MessageEOFException e)
      {
      }
View Full Code Here

    {
        super.assertEquivalent(m,mode, redelivery);
       
        StreamMessage sm = (StreamMessage)m;
       
        assertTrue(sm.readBoolean());
       
        byte bytes[] = new byte[5];
        sm.readBytes(bytes);
        String s = new String(bytes);
        assertEquals("jboss",s);
View Full Code Here

    }

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

    queueProducer.send(queue1, m);

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

    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[4], bytes2[2]);

    ret = m2.readBytes(bytes2);
    assertEquals(-1, ret);

    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)
    {
    }
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.