Package net.timewalker.ffmq3.common.message

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


   
    // String
    msg = new StreamMessageImpl();
    msg.writeLong(123);
    msg.markAsReadOnly();
    assertEquals("123",msg.readString());
   
    // Bytes
    msg = new StreamMessageImpl();
    msg.writeLong(123);
    msg.markAsReadOnly();
View Full Code Here


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

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

    // Byte
    msg = new StreamMessageImpl();
    msg.writeString("foobar");
    msg.markAsReadOnly();
    try { msg.readByte(); fail("Should have failed"); } catch (NumberFormatException e) { /* OK */  }
    assertEquals("foobar",msg.readString());
   
    // Short
    msg = new StreamMessageImpl();
    msg.writeString("foobar");
    msg.markAsReadOnly();
View Full Code Here

    // Short
    msg = new StreamMessageImpl();
    msg.writeString("foobar");
    msg.markAsReadOnly();
    try { msg.readShort(); fail("Should have failed"); } catch (NumberFormatException e) { /* OK */  }
    assertEquals("foobar",msg.readString());
   
    // Char
    msg = new StreamMessageImpl();
    msg.writeString("foobar");
    msg.markAsReadOnly();
View Full Code Here

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

    // Int
    msg = new StreamMessageImpl();
    msg.writeString("foobar");
    msg.markAsReadOnly();
    try { msg.readInt(); fail("Should have failed"); } catch (NumberFormatException e) { /* OK */ }
    assertEquals("foobar",msg.readString());
   
    // Long
    msg = new StreamMessageImpl();
    msg.writeString("foobar");
    msg.markAsReadOnly();
View Full Code Here

   
    // String
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
    assertEquals("true",msg.readString());
   
    // Bytes
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
View Full Code Here

   
    // String
    msg = new StreamMessageImpl();
    msg.writeByte((byte)123);
    msg.markAsReadOnly();
    assertEquals("123",msg.readString());
   
    // Bytes
    msg = new StreamMessageImpl();
    msg.writeByte((byte)123);
    msg.markAsReadOnly();
View Full Code Here

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