Class LongTypeEncoder
java.lang.Object
org.apache.qpid.protonj2.codec.encoders.AbstractPrimitiveTypeEncoder<Long>
org.apache.qpid.protonj2.codec.encoders.primitives.LongTypeEncoder
- All Implemented Interfaces:
PrimitiveTypeEncoder<Long>,TypeEncoder<Long>
Encoder of AMQP Integer type values to a byte stream.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidwriteArray(ProtonBuffer buffer, EncoderState state, long[] values) voidwriteRawArray(ProtonBuffer buffer, EncoderState state, long[] values) voidwriteRawArray(ProtonBuffer buffer, EncoderState state, Object[] values) Write an array elements of the AMQP type to the given byte buffer.voidwriteType(ProtonBuffer buffer, EncoderState state, long value) Write the full AMQP type data for the long to the given byte buffer.voidwriteType(ProtonBuffer buffer, EncoderState state, Long value) Write the full AMQP type data to the given byte buffer.Methods inherited from class org.apache.qpid.protonj2.codec.encoders.AbstractPrimitiveTypeEncoder
isArrayType, writeArray
-
Constructor Details
-
LongTypeEncoder
public LongTypeEncoder()
-
-
Method Details
-
getTypeClass
- Returns:
- the Class type that this encoder handles.
-
writeType
Description copied from interface:TypeEncoderWrite the full AMQP type data to the given byte buffer.This can consist of writing both a type constructor value and the bytes that make up the value of the type being written.
- Parameters:
buffer- The buffer to write the AMQP type tostate- The current encoder statevalue- The value that is to be written.
-
writeType
Write the full AMQP type data for the long to the given byte buffer. This can consist of writing both a type constructor value and the bytes that make up the value of the type being written.- Parameters:
buffer- TheProtonBufferinstance to write the encoding to.state- TheEncoderStatefor use in encoding operations.value- The long value to encode.
-
writeRawArray
Description copied from interface:TypeEncoderWrite an array elements of the AMQP type to the given byte buffer.This method writes only the body portion of an AMQP array of this type, the array encoding, size and element count should be assumed to be managed by the caller.
- Parameters:
buffer- The buffer to write the AMQP array elements tostate- The current encoder statevalues- The array of values that is to be written.
-
writeRawArray
-
writeArray
-