Package net.timewalker.ffmq3.common.message

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


       
        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.writeShort((short)123);
    msg.markAsReadOnly();
    try { msg.readBoolean(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals(123,msg.readShort());
   
    // Byte
View Full Code Here

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

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

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

    try { msg.readChar(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals(123,msg.readShort());
   
    // Int
    msg = new StreamMessageImpl();
    msg.writeShort((short)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.writeShort((short)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.writeShort((short)123);
    msg.markAsReadOnly();
    try { msg.readFloat(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertEquals(123,msg.readShort());
   
    // Double
View Full Code Here

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