Examples of UnsignedIntegerEncoding


Examples of org.apache.qpid.proton.codec.UnsignedIntegerType.UnsignedIntegerEncoding

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

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

Examples of org.apache.qpid.proton.codec.UnsignedIntegerType.UnsignedIntegerEncoding

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

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

Examples of org.apache.qpid.proton.codec.UnsignedIntegerType.UnsignedIntegerEncoding

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

        long val = Integer.MAX_VALUE + 1L;
        UnsignedIntegerEncoding encoding = ult.getEncoding(UnsignedInteger.valueOf(val));
        assertEquals("incorrect encoding returned", EncodingCodes.UINT, 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.