Package javax.jms

Examples of javax.jms.BytesMessage.readFloat()


      ProxyAssertSupport.assertEquals((byte)4, bytes[0]);
      ProxyAssertSupport.assertEquals((byte)5, bytes[1]);
      ProxyAssertSupport.assertEquals((byte)6, bytes[2]);
      ProxyAssertSupport.assertEquals((char)7, bm.readChar());
      ProxyAssertSupport.assertEquals(new Double(8.0), new Double(bm.readDouble()));
      ProxyAssertSupport.assertEquals(new Float(9.0), new Float(bm.readFloat()));
      ProxyAssertSupport.assertEquals(10, bm.readInt());
      ProxyAssertSupport.assertEquals(11l, bm.readLong());
      ProxyAssertSupport.assertEquals((short)12, bm.readShort());
      ProxyAssertSupport.assertEquals("this is an UTF String", bm.readUTF());
   }
View Full Code Here


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

      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());
      ProxyAssertSupport.assertEquals(myFloat, m2.readFloat(), 0);
      ProxyAssertSupport.assertEquals(myDouble, m2.readDouble(), 0);
      ProxyAssertSupport.assertEquals(myString, m2.readUTF());

      byte[] bytes = new byte[6];
      int ret = m2.readBytes(bytes);
View Full Code Here

      ProxyAssertSupport.assertEquals(myBool, m2.readBoolean());
      ProxyAssertSupport.assertEquals(myByte, m2.readByte());
      ProxyAssertSupport.assertEquals(myShort, m2.readShort());
      ProxyAssertSupport.assertEquals(myInt, m2.readInt());
      ProxyAssertSupport.assertEquals(myLong, m2.readLong());
      ProxyAssertSupport.assertEquals(myFloat, m2.readFloat(), 0);
      ProxyAssertSupport.assertEquals(myDouble, m2.readDouble(), 0);
      ProxyAssertSupport.assertEquals(myString, m2.readUTF());

      bytes = new byte[6];
      ret = m2.readBytes(bytes);
View Full Code Here

         // OK
      }

      try
      {
         m2.readFloat();
         ProxyAssertSupport.fail();
      }
      catch (MessageEOFException e)
      {
         // OK
View Full Code Here

        {
            BytesMessage msg = _session.createBytesMessage();

            try
            {
                msg.readFloat();
                Assert.fail("Message should not be readable");
            }
            catch (MessageNotReadableException mnwe)
            {
                // normal execution
View Full Code Here

      assertTrue("Int == 314159", recv.readInt() == 314159);
      assertTrue("Long == 3141592653589793238L",
         recv.readLong() == 3141592653589793238L);
      assertTrue("Double == 3.1415926535897932384626433832795",
         recv.readDouble() == 3.1415926535897932384626433832795);
      assertTrue("Float == true", recv.readFloat() == 3.141f);
      assertTrue("Object == 31415926535897932384626433832795",
         recv.readUTF().equals("31415926535897932384626433832795"));
      assertTrue("String == 31415926535897932384626433832795",
         recv.readUTF().equals("31415926535897932384626433832795"));
   }
View Full Code Here

      assertEquals(myByte, m2.readByte());
      assertEquals(myShort, m2.readShort());
      assertEquals(myChar, m2.readChar());
      assertEquals(myInt, m2.readInt());
      assertEquals(myLong, m2.readLong());
      assertEquals(myFloat, m2.readFloat(), 0);
      assertEquals(myDouble, m2.readDouble(), 0);
      assertEquals(myString, m2.readUTF());

      byte[] bytes = new byte[6];
      int ret = m2.readBytes(bytes);
View Full Code Here

      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);
      assertEquals(myDouble, m2.readDouble(), 0);
      assertEquals(myString, m2.readUTF());

      bytes = new byte[6];
      ret = m2.readBytes(bytes);
View Full Code Here

         // OK
      }

      try
      {
         m2.readFloat();
         fail();
      }
      catch (MessageEOFException e)
      {
         // OK
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.