Package org.apache.qpid.client.message

Examples of org.apache.qpid.client.message.JMSStreamMessage.readLong()


        byte[] bytes = new byte[4];
        bm.readBytes(bytes);
        assertEquals('g', bm.readChar());
        assertEquals((short) 29, bm.readShort());
        assertEquals(101, bm.readInt());
        assertEquals(50003222L, bm.readLong());
        assertEquals("Foobar", bm.readString());
        assertEquals(1.7f, bm.readFloat());
        assertEquals(8.7d, bm.readDouble());
    }
View Full Code Here


        try
        {
            JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
            bm.writeLong(4L);
            bm.reset();
            bm.readLong();
            // should throw
            bm.readLong();
            fail("expected exception did not occur");
        }
        catch (MessageEOFException m)
View Full Code Here

            JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
            bm.writeLong(4L);
            bm.reset();
            bm.readLong();
            // should throw
            bm.readLong();
            fail("expected exception did not occur");
        }
        catch (MessageEOFException m)
        {
            // ok
View Full Code Here

        bm.reset();
        assertEquals(43, bm.readShort());
        bm.reset();
        assertEquals(43, bm.readInt());
        bm.reset();
        assertEquals(43, bm.readLong());
        bm.reset();
        String result = bm.readString();
        assertEquals("43", result);
        bm.reset();
        checkConversionsFail(bm, new int[]{0, 3, 6, 7, 9});
View Full Code Here

        JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeShort((short) 87);
        bm.reset();
        assertEquals(87, bm.readInt());
        bm.reset();
        assertEquals(87, bm.readLong());
        bm.reset();
        assertEquals("87", bm.readString());
        bm.reset();
        checkConversionsFail(bm, new int[]{0, 1, 3, 6, 7, });
    }
View Full Code Here

    public void testIntConversions() throws Exception
    {
        JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeInt(167);
        bm.reset();
        assertEquals(167, bm.readLong());
        bm.reset();
        assertEquals("167", bm.readString());
        bm.reset();
        checkConversionsFail(bm, new int[]{0, 1, 2, 3, 6, 7, 9});
    }
View Full Code Here

        bm.reset();
        assertEquals((short)2, bm.readShort());
        bm.reset();
        assertEquals(2, bm.readInt());
        bm.reset();
        assertEquals((long)2, bm.readLong());
        bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeString("5.7");
        bm.reset();
        assertEquals(5.7f, bm.readFloat());
        bm.reset();
View Full Code Here

        try
        {
            JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
            bm.writeLong(4L);
            bm.reset();
            bm.readLong();
            // should throw
            bm.readLong();
            fail("expected exception did not occur");
        }
        catch (MessageEOFException m)
View Full Code Here

            JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
            bm.writeLong(4L);
            bm.reset();
            bm.readLong();
            // should throw
            bm.readLong();
            fail("expected exception did not occur");
        }
        catch (MessageEOFException m)
        {
            // ok
View Full Code Here

        bm.reset();
        assertEquals(43, bm.readShort());
        bm.reset();
        assertEquals(43, bm.readInt());
        bm.reset();
        assertEquals(43, bm.readLong());
        bm.reset();
        String result = bm.readString();
        assertEquals("43", result);
        bm.reset();
        checkConversionsFail(bm, new int[]{0, 3, 6, 7, 9});
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.