Package net.timewalker.ffmq3.common.message

Examples of net.timewalker.ffmq3.common.message.StreamMessageImpl.writeFloat()


    msg.markAsReadOnly();
    assertEquals(1.23,msg.readDouble(),0.0000001);
   
    // String
    msg = new StreamMessageImpl();
    msg.writeFloat(1.23f);
    msg.markAsReadOnly();
    assertEquals("1.23",msg.readString());
   
    // Bytes
    msg = new StreamMessageImpl();
View Full Code Here


    msg.markAsReadOnly();
    assertEquals("1.23",msg.readString());
   
    // Bytes
    msg = new StreamMessageImpl();
    msg.writeFloat(1.23f);
    msg.markAsReadOnly();
    try { msg.readBytes(new byte[1]); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals(1.23f,msg.readFloat(),0);
  }
 
 
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.