Examples of UnsignedLongEncoding


Examples of org.apache.qpid.proton.codec.UnsignedLongType.UnsignedLongEncoding

        DecoderImpl decoder = new DecoderImpl();
        EncoderImpl encoder = new EncoderImpl(decoder);
        UnsignedLongType ult = new UnsignedLongType(encoder, decoder);

        //values of 0 are encoded as a specific type
        UnsignedLongEncoding encoding = ult.getEncoding(UnsignedLong.valueOf(0L));
        assertEquals("incorrect encoding returned", EncodingCodes.ULONG0, encoding.getEncodingCode());
    }
View Full Code Here

Examples of org.apache.qpid.proton.codec.UnsignedLongType.UnsignedLongEncoding

        DecoderImpl decoder = new DecoderImpl();
        EncoderImpl encoder = new EncoderImpl(decoder);
        UnsignedLongType ult = new UnsignedLongType(encoder, decoder);

        //values between 0 and 255 are encoded as a specific 'small' type using a single byte
        UnsignedLongEncoding encoding = ult.getEncoding(UnsignedLong.valueOf(1L));
        assertEquals("incorrect encoding returned", EncodingCodes.SMALLULONG, encoding.getEncodingCode());
    }
View Full Code Here

Examples of org.apache.qpid.proton.codec.UnsignedLongType.UnsignedLongEncoding

        DecoderImpl decoder = new DecoderImpl();
        EncoderImpl encoder = new EncoderImpl(decoder);
        UnsignedLongType ult = new UnsignedLongType(encoder, decoder);

        BigInteger bigInt = BigInteger.valueOf(Long.MAX_VALUE).add(BigInteger.ONE);
        UnsignedLongEncoding encoding = ult.getEncoding(UnsignedLong.valueOf(bigInt));
        assertEquals("incorrect encoding returned", EncodingCodes.ULONG, encoding.getEncodingCode());
    }
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.