Class ProtonEncodings
java.lang.Object
org.apache.qpid.protonj2.codec.encoders.ProtonEncodings
Static method that perform some of the most common type encodings
that have well defined formats that don't need further lookups or
null checks etc.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidwriteBinary(ProtonBuffer buffer, ProtonBuffer value) Write the Binary value into to provided buffer using the most compact AMQP encoding possible based on the size of the buffer contents.static voidwriteDeliveryTag(ProtonBuffer buffer, DeliveryTag value) Write the DeliveryTag bytes value into to provided buffer using the most compact AMQP encoding possible based on the size of the tag buffer contents.static voidwriteString(ProtonBuffer buffer, EncoderState state, String value) Write the String value into to provided buffer using the most compact AMQP encoding possible based on the size of the String contents.static voidwriteSymbol(ProtonBuffer buffer, String value) Write the Symbol value into to provided buffer using the most compact AMQP encoding possible based on the size of the Symbol contents.static voidwriteSymbol(ProtonBuffer buffer, Symbol value) Write the Symbol value into to provided buffer using the most compact AMQP encoding possible based on the size of the Symbol contents.static voidwriteUnsignedInteger(ProtonBuffer buffer, byte value) Write the byte value that carries the unsigned integer using the most compact AMQP encoding possible based on the value of the integer provided.static voidwriteUnsignedInteger(ProtonBuffer buffer, int value) Write the integer value that carries the unsigned integer using the most compact AMQP encoding possible based on the value of the integer provided.static voidwriteUnsignedInteger(ProtonBuffer buffer, long value) Write the long value that carries the unsigned integer using the most compact AMQP encoding possible based on the value of the long provided.static voidwriteUnsignedLong(ProtonBuffer buffer, byte value) Write the byte value that carries the unsigned long value using the most compact AMQP encoding possible based on the value of the long.static voidwriteUnsignedLong(ProtonBuffer buffer, long value) Write the long value that carries the unsigned long value using the most compact AMQP encoding possible based on the value of the long.
-
Method Details
-
writeUnsignedInteger
Write the byte value that carries the unsigned integer using the most compact AMQP encoding possible based on the value of the integer provided.- Parameters:
buffer- The buffer where the encoding should be written tovalue- The unsigned integer value to write carried in a java primitive
-
writeUnsignedInteger
Write the integer value that carries the unsigned integer using the most compact AMQP encoding possible based on the value of the integer provided.- Parameters:
buffer- The buffer where the encoding should be written tovalue- The unsigned integer value to write carried in a java primitive
-
writeUnsignedInteger
Write the long value that carries the unsigned integer using the most compact AMQP encoding possible based on the value of the long provided. The value must has already been checked for overflow by the object calling this method.- Parameters:
buffer- The buffer where the encoding should be written tovalue- The unsigned integer value to write carried in a java primitive
-
writeUnsignedLong
Write the byte value that carries the unsigned long value using the most compact AMQP encoding possible based on the value of the long.- Parameters:
buffer- The buffer where the encoding should be written tovalue- The unsigned long value to write carried in a java primitive
-
writeUnsignedLong
Write the long value that carries the unsigned long value using the most compact AMQP encoding possible based on the value of the long.- Parameters:
buffer- The buffer where the encoding should be written tovalue- The unsigned long value to write carried in a java primitive
-
writeSymbol
Write the Symbol value into to provided buffer using the most compact AMQP encoding possible based on the size of the Symbol contents.- Parameters:
buffer- The buffer where the encoding should be written tovalue- The Symbol value carried in the given String to write
-
writeSymbol
Write the Symbol value into to provided buffer using the most compact AMQP encoding possible based on the size of the Symbol contents.- Parameters:
buffer- The buffer where the encoding should be written tovalue- The Symbol value to write into the buffer
-
writeString
Write the String value into to provided buffer using the most compact AMQP encoding possible based on the size of the String contents.- Parameters:
buffer- The buffer where the encoding should be written tovalue- The String value to write into the buffer
-
writeBinary
Write the Binary value into to provided buffer using the most compact AMQP encoding possible based on the size of the buffer contents.- Parameters:
buffer- The buffer where the encoding should be written tovalue- The ProtonBuffer value to write into the buffer as a Binary encoding
-
writeDeliveryTag
Write the DeliveryTag bytes value into to provided buffer using the most compact AMQP encoding possible based on the size of the tag buffer contents.- Parameters:
buffer- The buffer where the encoding should be written tovalue- The DeliveryTag value to write into the buffer as a Binary encoding
-