Package net.timewalker.ffmq3.common.message

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


        msg.writeChar('c');
        msg.writeByte((byte)1);
        msg.writeShort((short)2);
        msg.writeInt(3);
        msg.writeLong(4);
        msg.writeFloat(1.23f);
        msg.writeDouble(4.56);
        msg.writeBytes(createDummyByteArray(size));
       
        return msg;
    }
View Full Code Here


        msg.writeChar('c');
        msg.writeByte((byte)1);
        msg.writeShort((short)2);
        msg.writeInt(3);
        msg.writeLong(4);
        msg.writeFloat(1.23f);
        msg.writeDouble(4.56);
        msg.writeBytes(createDummyByteArray(size));
       
        return msg;
    }
View Full Code Here

  {
    StreamMessageImpl msg;
   
    // Boolean
    msg = new StreamMessageImpl();
    msg.writeFloat(1.23f);
    msg.markAsReadOnly();
    try { msg.readBoolean(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals(1.23f,msg.readFloat(),0);
   
    // Byte
View Full Code Here

    try { msg.readBoolean(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals(1.23f,msg.readFloat(),0);
   
    // Byte
    msg = new StreamMessageImpl();
    msg.writeFloat(1.23f);
    msg.markAsReadOnly();
    try { msg.readByte(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals(1.23f,msg.readFloat(),0);
   
    // Short
View Full Code Here

    try { msg.readByte(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals(1.23f,msg.readFloat(),0);
   
    // Short
    msg = new StreamMessageImpl();
    msg.writeFloat(1.23f);
    msg.markAsReadOnly();
    try { msg.readShort(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals(1.23f,msg.readFloat(),0);
   
    // Char
View Full Code Here

    try { msg.readShort(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals(1.23f,msg.readFloat(),0);
   
    // Char
    msg = new StreamMessageImpl();
    msg.writeFloat(1.23f);
    msg.markAsReadOnly();
    try { msg.readChar(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals(1.23f,msg.readFloat(),0);
   
    // Int
View Full Code Here

    try { msg.readChar(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals(1.23f,msg.readFloat(),0);
   
    // Int
    msg = new StreamMessageImpl();
    msg.writeFloat(1.23f);
    msg.markAsReadOnly();
    try { msg.readInt(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertEquals(1.23f,msg.readFloat(),0);
   
    // Long
View Full Code Here

    try { msg.readInt(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertEquals(1.23f,msg.readFloat(),0);
   
    // Long
    msg = new StreamMessageImpl();
    msg.writeFloat(1.23f);
    msg.markAsReadOnly();
    try { msg.readLong(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertEquals(1.23f,msg.readFloat(),0);
   
    // Float
View Full Code Here

    try { msg.readLong(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertEquals(1.23f,msg.readFloat(),0);
   
    // Float
    msg = new StreamMessageImpl();
    msg.writeFloat(1.23f);
    msg.markAsReadOnly();
    assertEquals(1.23f,msg.readFloat(),0);
   
    // Double
    msg = new StreamMessageImpl();
View Full Code Here

    msg.markAsReadOnly();
    assertEquals(1.23f,msg.readFloat(),0);
   
    // Double
    msg = new StreamMessageImpl();
    msg.writeFloat(1.23f);
    msg.markAsReadOnly();
    assertEquals(1.23,msg.readDouble(),0.0000001);
   
    // String
    msg = new StreamMessageImpl();
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.