Package javax.jms

Examples of javax.jms.StreamMessage.readInt()


      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);
      assertEquals(myDouble, m2.readDouble(), 0);
      assertEquals(myString, m2.readString());
View Full Code Here


      {
      }

      try
      {
         m2.readInt();
         fail();
      }
      catch (MessageEOFException e)
      {
      }
View Full Code Here

      // check we go back to the beginning
      assertEquals(myBool, m2.readBoolean());
      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.readString());
View Full Code Here

      catch (javax.jms.MessageNotReadableException e)
      {
      }
      try
      {
         m.readInt();
         fail();
      }
      catch (javax.jms.MessageNotReadableException e)
      {
      }
View Full Code Here

      assertEquals(myBool, m2.readBoolean());
      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.readString());
View Full Code Here

      assertEquals((byte)6, bytes[2]);
      assertEquals(-1, sm.readBytes(bytes));
      assertEquals((char)7, sm.readChar());
      assertEquals(new Double(8.0), new Double(sm.readDouble()));
      assertEquals(new Float(9.0), new Float(sm.readFloat()));
      assertEquals(10, sm.readInt());
      assertEquals(11l, sm.readLong());
      assertEquals("this is an object", sm.readObject());
      assertEquals((short)12, sm.readShort());
      assertEquals("this is a String", sm.readString());
   }
View Full Code Here

        assertEquals(-1,sm.readBytes(bytes));
       
        assertEquals(sm.readChar(),'c');
        assertEquals(sm.readDouble(),1.0D,0.0D);
        assertEquals(sm.readFloat(),2.0F,0.0F);
        assertEquals(sm.readInt(),3);
        assertEquals(sm.readLong(),4L);
        assertEquals(sm.readObject(),"object");
        assertEquals(sm.readShort(),(short)5);
        assertEquals(sm.readString(),"stringvalue");
    }
View Full Code Here

        assertEquals(true,msg.readBoolean());
        assertEquals((byte)12,msg.readByte());
        assertEquals('a',msg.readChar());
        assertEquals(1.23456789,msg.readDouble(),0.0000001);
        assertEquals(4.5678f,msg.readFloat(),0.000001);
        assertEquals(1234,msg.readInt());
        assertEquals(1234567890,msg.readLong());
        assertEquals(new Integer(444),msg.readObject());
        assertEquals(null,msg.readObject());
        assertEquals((short)123,msg.readShort());
        assertEquals("foobar",msg.readString());
View Full Code Here

            //Ok
         }
        
         try
         {
            received.readInt();
           
            fail("Should throw exception");
         }
         catch (MessageEOFException e)
         {
View Full Code Here

      ProxyAssertSupport.assertEquals(-1, sm.readBytes(bytes));

      ProxyAssertSupport.assertEquals(sm.readChar(), 'c');
      ProxyAssertSupport.assertEquals(sm.readDouble(), 1.0D, 0.0D);
      ProxyAssertSupport.assertEquals(sm.readFloat(), 2.0F, 0.0F);
      ProxyAssertSupport.assertEquals(sm.readInt(), 3);
      ProxyAssertSupport.assertEquals(sm.readLong(), 4L);
      ProxyAssertSupport.assertEquals(sm.readObject(), "object");
      ProxyAssertSupport.assertEquals(sm.readShort(), (short)5);
      ProxyAssertSupport.assertEquals(sm.readString(), "stringvalue");
   }
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.