Package net.timewalker.ffmq3.common.message

Examples of net.timewalker.ffmq3.common.message.StreamMessageImpl.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
    msg = new StreamMessageImpl();
    msg.writeInt(123);
    msg.markAsReadOnly();
View Full Code Here


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

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

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

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

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

    // Bytes
    msg = new StreamMessageImpl();
    msg.writeInt(123);
    msg.markAsReadOnly();
    try { msg.readBytes(new byte[1]); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals(123,msg.readInt());
  }
 
  public void testLongConversion() throws Exception
  {
    StreamMessageImpl msg;
View Full Code Here

   
    // Int
    msg = new StreamMessageImpl();
    msg.writeString("123");
    msg.markAsReadOnly();
    assertEquals(123,msg.readInt());
   
    // Long
    msg = new StreamMessageImpl();
    msg.writeString("123");
    msg.markAsReadOnly();
View Full Code Here

   
    // Int
    msg = new StreamMessageImpl();
    msg.writeBytes(dummy);
    msg.markAsReadOnly();
    try { msg.readInt(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertEquals(3,msg.readBytes(new byte[3]));
   
    // Long
    msg = new StreamMessageImpl();
    msg.writeBytes(dummy);
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.