Module org.apache.qpid.protonj2
Interface BinaryTypeDecoder
- All Superinterfaces:
PrimitiveTypeDecoder<Binary>,StreamTypeDecoder<Binary>,TypeDecoder<Binary>
- All Known Implementing Classes:
AbstractBinaryTypeDecoder,Binary32TypeDecoder,Binary8TypeDecoder
Base for all Binary type value decoders.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the Class that this decoder handles.byte[]readValueAsArray(InputStream stream, StreamDecoderState state) Read and decode an AMQPBinaryinto a byte array instance and return it.byte[]readValueAsArray(ProtonBuffer buffer, DecoderState state) Read and decode an AMQPBinaryinto a byte array instance and return it.readValueAsBuffer(InputStream stream, StreamDecoderState state) Read and decode an AMQPBinaryinto aProtonBufferinstance and return it.readValueAsBuffer(ProtonBuffer buffer, DecoderState state) Read and decode an AMQPBinaryinto aProtonBufferinstance and return it.Methods inherited from interface org.apache.qpid.protonj2.codec.decoders.PrimitiveTypeDecoder
getTypeCode, isJavaPrimitive, isPrimitive, isZeroWidth, readPrimitiveArray, readPrimitiveArrayMethods inherited from interface org.apache.qpid.protonj2.codec.StreamTypeDecoder
isArrayType, isNull, readArrayElements, readSize, readValue, skipValueMethods inherited from interface org.apache.qpid.protonj2.codec.TypeDecoder
isArrayType, isNull, readArrayElements, readSize, readValue, skipValue
-
Method Details
-
getTypeClass
Description copied from interface:TypeDecoderReturns the Class that this decoder handles.- Specified by:
getTypeClassin interfaceStreamTypeDecoder<Binary>- Specified by:
getTypeClassin interfaceTypeDecoder<Binary>- Returns:
- the Class that this decoder handles
-
readValueAsBuffer
Read and decode an AMQPBinaryinto aProtonBufferinstance and return it.- Parameters:
buffer- TheProtonBufferwhere theBinaryencoding should be read from.state- TheEncoderStatethat can be used when reading the encoded value.- Returns:
- the bytes that comprise the encoded Binary wrapped in a
ProtonBufferinstance. - Throws:
DecodeException- if an error occurs while reading the Binary value.
-
readValueAsArray
Read and decode an AMQPBinaryinto a byte array instance and return it.- Parameters:
buffer- TheProtonBufferwhere theBinaryencoding should be read from.state- TheEncoderStatethat can be used when reading the encoded value.- Returns:
- the bytes that comprise the encoded Binary copied into a byte array instance.
- Throws:
DecodeException- if an error occurs while reading the Binary value.
-
readValueAsBuffer
Read and decode an AMQPBinaryinto aProtonBufferinstance and return it.- Parameters:
stream- TheInputStreamwhere theBinaryencoding should be read from.state- TheEncoderStatethat can be used when reading the encoded value.- Returns:
- the bytes that comprise the encoded Binary wrapped in a
ProtonBufferinstance. - Throws:
DecodeException- if an error occurs while reading the Binary value.
-
readValueAsArray
Read and decode an AMQPBinaryinto a byte array instance and return it.- Parameters:
stream- TheInputStreamwhere theBinaryencoding should be read from.state- TheEncoderStatethat can be used when reading the encoded value.- Returns:
- the bytes that comprise the encoded Binary copied into a byte array instance.
- Throws:
DecodeException- if an error occurs while reading the Binary value.
-