Class AbstractPrimitiveTypeEncoder<V>

java.lang.Object
org.apache.qpid.protonj2.codec.encoders.AbstractPrimitiveTypeEncoder<V>
Type Parameters:
V - The type that this primitive encoder handles
All Implemented Interfaces:
PrimitiveTypeEncoder<V>, TypeEncoder<V>
Direct Known Subclasses:
BinaryTypeEncoder, BooleanTypeEncoder, ByteTypeEncoder, CharacterTypeEncoder, Decimal128TypeEncoder, Decimal32TypeEncoder, Decimal64TypeEncoder, DoubleTypeEncoder, FloatTypeEncoder, IntegerTypeEncoder, ListTypeEncoder, LongTypeEncoder, MapTypeEncoder, NullTypeEncoder, ShortTypeEncoder, StringTypeEncoder, SymbolTypeEncoder, TimestampTypeEncoder, UnsignedByteTypeEncoder, UnsignedIntegerTypeEncoder, UnsignedLongTypeEncoder, UnsignedShortTypeEncoder, UUIDTypeEncoder

public abstract class AbstractPrimitiveTypeEncoder<V> extends Object implements PrimitiveTypeEncoder<V>
Abstract implementation of the PrimitiveTypeEncoder that implements the common methods that most of the primitive type
  • Constructor Details

    • AbstractPrimitiveTypeEncoder

      public AbstractPrimitiveTypeEncoder()
  • Method Details

    • isArrayType

      public boolean isArrayType()
      Specified by:
      isArrayType in interface TypeEncoder<V>
      Returns:
      true if the type handled by this encoded is an AMQP Array type.
    • writeArray

      public void writeArray(ProtonBuffer buffer, EncoderState state, Object[] values)
      Description copied from interface: TypeEncoder
      Write an array elements of the AMQP type to the given byte buffer.

      This method writes the full Array type definition of an array of the type this encoder manages.

      Specified by:
      writeArray in interface TypeEncoder<V>
      Parameters:
      buffer - The buffer to write the AMQP array elements to
      state - The current encoder state
      values - The array of values that is to be written.