Package net.timewalker.ffmq3.common.message

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


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


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

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

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

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

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

    // 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());
  }
 
  public void testNumericStringConversion() throws Exception
  {
    StreamMessageImpl msg;
View Full Code Here

    // 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
    msg = new StreamMessageImpl();
    msg.writeString("123");
    msg.markAsReadOnly();
View Full Code Here

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

    // Bytes
    msg = new StreamMessageImpl();
    msg.writeString("123");
    msg.markAsReadOnly();
    try { msg.readBytes(new byte[1]); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals("123",msg.readString());
  }
 
  public void testBytesConversion() throws Exception
  {
    StreamMessageImpl msg;
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.