Package net.timewalker.ffmq3.common.message

Examples of net.timewalker.ffmq3.common.message.BytesMessageImpl.writeInt()


        msg.writeBoolean(true);
        msg.writeUTF("foobar");
        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));
       
View Full Code Here


        msg.writeBoolean(true);
        msg.writeString("foobar");
        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));
       
View Full Code Here

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

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

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

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

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

    msg.markAsReadOnly();
    assertEquals(123,msg.readInt());
   
    // Long
    msg = new StreamMessageImpl();
    msg.writeInt(123);
    msg.markAsReadOnly();
    assertEquals(123,msg.readLong());
   
    // Float
    msg = new StreamMessageImpl();
View Full Code Here

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

    try { msg.readFloat(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertEquals(123,msg.readInt());
   
    // Double
    msg = new StreamMessageImpl();
    msg.writeInt(123);
    msg.markAsReadOnly();
    try { msg.readDouble(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertEquals(123,msg.readInt());
   
    // String
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.