Package net.timewalker.ffmq3.common.message

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


    msg.markAsReadOnly();
    assertEquals("foobar",msg.readString());
   
    // Bytes
    msg = new StreamMessageImpl();
    msg.writeString("foobar");
    msg.markAsReadOnly();
    try { msg.readBytes(new byte[1]); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals("foobar",msg.readString());
  }
 
 
View Full Code Here


  {
    StreamMessageImpl msg;
   
    // Boolean
    msg = new StreamMessageImpl();
    msg.writeString("123");
    msg.markAsReadOnly();
    assertFalse(msg.readBoolean());
   
    // Byte
    msg = new StreamMessageImpl();
View Full Code Here

    msg.markAsReadOnly();
    assertFalse(msg.readBoolean());
   
    // Byte
    msg = new StreamMessageImpl();
    msg.writeString("123");
    msg.markAsReadOnly();
    assertEquals((byte)123,msg.readByte());
   
    // Short
    msg = new StreamMessageImpl();
View Full Code Here

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

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

    msg.markAsReadOnly();
    assertEquals(123,msg.readFloat(),0);
   
    // Double
    msg = new StreamMessageImpl();
    msg.writeString("123");
    msg.markAsReadOnly();
    assertEquals(123,msg.readDouble(),0);
   
    // String
    msg = new StreamMessageImpl();
View Full Code Here

    msg.markAsReadOnly();
    assertEquals(123,msg.readDouble(),0);
   
    // String
    msg = new StreamMessageImpl();
    msg.writeString("123");
    msg.markAsReadOnly();
    assertEquals("123",msg.readString());
   
    // Bytes
    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.