Class BooleanTypeEncoder
- java.lang.Object
-
- org.apache.qpid.protonj2.codec.encoders.AbstractPrimitiveTypeEncoder<java.lang.Boolean>
-
- org.apache.qpid.protonj2.codec.encoders.primitives.BooleanTypeEncoder
-
- All Implemented Interfaces:
PrimitiveTypeEncoder<java.lang.Boolean>,TypeEncoder<java.lang.Boolean>
public final class BooleanTypeEncoder extends AbstractPrimitiveTypeEncoder<java.lang.Boolean>
Encoder of AMQP Boolean True types to a byte stream.
-
-
Constructor Summary
Constructors Constructor Description BooleanTypeEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<java.lang.Boolean>getTypeClass()voidwriteArray(ProtonBuffer buffer, EncoderState state, boolean[] values)Write the full AMQP type data for the boolean array to the given byte buffer.voidwriteRawArray(ProtonBuffer buffer, EncoderState state, boolean[] values)Write the AMQP type data to the given byte buffer without an type encoding metadatavoidwriteRawArray(ProtonBuffer buffer, EncoderState state, java.lang.Object[] values)Write an array elements of the AMQP type to the given byte buffer.voidwriteType(ProtonBuffer buffer, EncoderState state, boolean value)Write the full AMQP type data for the boolean to the given byte buffer.voidwriteType(ProtonBuffer buffer, EncoderState state, java.lang.Boolean 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
-
-
-
-
Method Detail
-
getTypeClass
public java.lang.Class<java.lang.Boolean> getTypeClass()
- Returns:
- the Class type that this encoder handles.
-
writeType
public void writeType(ProtonBuffer buffer, EncoderState state, java.lang.Boolean value)
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
public void writeType(ProtonBuffer buffer, EncoderState state, boolean value)
Write the full AMQP type data for the boolean 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 boolean value to encode.
-
writeRawArray
public void writeRawArray(ProtonBuffer buffer, EncoderState state, java.lang.Object[] values)
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
public void writeRawArray(ProtonBuffer buffer, EncoderState state, boolean[] values)
Write the AMQP type data to the given byte buffer without an type encoding metadata- Parameters:
buffer- TheProtonBufferinstance to write the encoding to.state- TheEncoderStatefor use in encoding operations.values- The boolean array value to encode.
-
writeArray
public void writeArray(ProtonBuffer buffer, EncoderState state, boolean[] values)
Write the full AMQP type data for the boolean array 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.values- The primitive boolean array value to encode.
-
-