Package org.apache.qpid.client.message

Examples of org.apache.qpid.client.message.JMSBytesMessage.reset()


    {
        try
        {
            JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
            bm.writeChar('A');
            bm.reset();
            bm.readChar();
            // should throw
            bm.readChar();
            fail("expected exception did not occur");
        }
View Full Code Here


    {
        try
        {
            JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
            bm.writeDouble(1.3d);
            bm.reset();
            bm.readDouble();
            // should throw
            bm.readDouble();
            fail("expected exception did not occur");
        }
View Full Code Here

    {
        try
        {
            JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
            bm.writeFloat(1.3f);
            bm.reset();
            bm.readFloat();
            // should throw
            bm.readFloat();
            fail("expected exception did not occur");
        }
View Full Code Here

    {
        try
        {
            JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
            bm.writeInt(99);
            bm.reset();
            bm.readInt();
            // should throw
            bm.readInt();
            fail("expected exception did not occur");
        }
View Full Code Here

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

    {
        try
        {
            JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
            bm.writeShort((short)4);
            bm.reset();
            bm.readShort();
            // should throw
            bm.readShort();
            fail("expected exception did not occur");
        }
View Full Code Here

    {
        try
        {
            JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
            bm.writeShort((short)4);
            bm.reset();
            bm.readUnsignedShort();
            // should throw
            bm.readUnsignedShort();
            fail("expected exception did not occur");
        }
View Full Code Here

    public void testReadBytes() throws Exception
    {
        JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
        bm.writeByte((byte)3);
        bm.writeByte((byte)4);
        bm.reset();
        byte[] result = new byte[2];
        int count = bm.readBytes(result);
        assertEquals((byte)3, result[0]);
        assertEquals((byte)4, result[1]);
        assertEquals(2, count);
View Full Code Here

    public void testReadBytesEOF() throws Exception
    {
        JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
        bm.writeByte((byte)3);
        bm.writeByte((byte)4);
        bm.reset();
        byte[] result = new byte[2];
        bm.readBytes(result);
        int count = bm.readBytes(result);
        assertEquals(-1, count);
    }
View Full Code Here

    public void testReadBytesWithLargerArray() throws Exception
    {
        JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
        bm.writeByte((byte)3);
        bm.writeByte((byte)4);
        bm.reset();
        byte[] result = new byte[3];
        int count = bm.readBytes(result);
        assertEquals(2, count);
        assertEquals((byte)3, result[0]);
        assertEquals((byte)4, result[1]);
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.