Package org.activemq.message

Examples of org.activemq.message.ActiveMQStreamMessage.readFloat()


    ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
    try {
      float test = 4.4f;
      msg.writeFloat(test);
      msg.reset();
      assertTrue(msg.readFloat()==test);
      msg.reset();
      assertTrue(msg.readDouble()==test);
      msg.reset();
      assertTrue(msg.readString().equals(new Float(test).toString()));
    }catch(JMSException jmsEx){
View Full Code Here


      assertTrue(msg.readLong()==testLong);
      msg.clearBody();
      float testFloat = 6.6f;
      msg.writeString(new Float(testFloat).toString());
      msg.reset();
      assertTrue(msg.readFloat()==testFloat);
      msg.clearBody();
      double testDouble = 7.7d;
      msg.writeString(new Double(testDouble).toString());
      msg.reset();
      assertTrue(msg.readDouble()==testDouble);
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.