Package net.timewalker.ffmq3.common.message

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


    public static BytesMessageImpl createBytesMessage( int size ) throws JMSException
    {
        BytesMessageImpl msg = new BytesMessageImpl();
        setDummyProperties(msg);
       
        msg.writeBoolean(true);
        msg.writeUTF("foobar");
        msg.writeChar('c');
        msg.writeByte((byte)1);
        msg.writeShort((short)2);
        msg.writeInt(3);
View Full Code Here


    public static StreamMessageImpl createStreamMessage( int size ) throws JMSException
    {
        StreamMessageImpl msg = new StreamMessageImpl();
        setDummyProperties(msg);
       
        msg.writeBoolean(true);
        msg.writeString("foobar");
        msg.writeChar('c');
        msg.writeByte((byte)1);
        msg.writeShort((short)2);
        msg.writeInt(3);
View Full Code Here

  {
    StreamMessageImpl msg;
   
    // Boolean
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
    assertTrue(msg.readBoolean());
   
    // Byte
    msg = new StreamMessageImpl();
View Full Code Here

    msg.markAsReadOnly();
    assertTrue(msg.readBoolean());
   
    // Byte
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
    try { msg.readByte(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertTrue(msg.readBoolean());
   
    // Short
View Full Code Here

    try { msg.readByte(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertTrue(msg.readBoolean());
   
    // Short
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
    try { msg.readShort(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertTrue(msg.readBoolean());

    // Char
View Full Code Here

    try { msg.readShort(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertTrue(msg.readBoolean());

    // Char
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
    try { msg.readChar(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertTrue(msg.readBoolean());
   
    // Int
View Full Code Here

    try { msg.readChar(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertTrue(msg.readBoolean());
   
    // Int
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
    try { msg.readInt(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertTrue(msg.readBoolean());
   
    // Long
View Full Code Here

    try { msg.readInt(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertTrue(msg.readBoolean());
   
    // Long
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
    try { msg.readLong(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertTrue(msg.readBoolean());
   
    // Float
View Full Code Here

    try { msg.readLong(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertTrue(msg.readBoolean());
   
    // Float
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
    try { msg.readFloat(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertTrue(msg.readBoolean());
   
    // Double
View Full Code Here

    try { msg.readFloat(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertTrue(msg.readBoolean());
   
    // Double
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
    try { msg.readDouble(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertTrue(msg.readBoolean());
   
    // 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.