Class Binary32TypeDecoder
java.lang.Object
org.apache.qpid.protonj2.codec.decoders.AbstractPrimitiveTypeDecoder<Binary>
org.apache.qpid.protonj2.codec.decoders.primitives.AbstractBinaryTypeDecoder
org.apache.qpid.protonj2.codec.decoders.primitives.Binary32TypeDecoder
- All Implemented Interfaces:
BinaryTypeDecoder,PrimitiveTypeDecoder<Binary>,StreamTypeDecoder<Binary>,TypeDecoder<Binary>
Decoder of AMQP Binary values from a byte stream.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintreadSize(InputStream stream) Reads the encoded size value for the encoded binary payload and returns it.intreadSize(ProtonBuffer buffer) Reads the encoded size value for the encoded binary payload and returns it.Methods inherited from class org.apache.qpid.protonj2.codec.decoders.primitives.AbstractBinaryTypeDecoder
readValue, readValue, readValueAsArray, readValueAsArray, readValueAsBuffer, readValueAsBuffer, skipValue, skipValueMethods inherited from class org.apache.qpid.protonj2.codec.decoders.AbstractPrimitiveTypeDecoder
isArrayType, isJavaPrimitive, readArrayElements, readArrayElementsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.qpid.protonj2.codec.decoders.primitives.BinaryTypeDecoder
getTypeClassMethods inherited from interface org.apache.qpid.protonj2.codec.decoders.PrimitiveTypeDecoder
isJavaPrimitiveMethods inherited from interface org.apache.qpid.protonj2.codec.StreamTypeDecoder
getTypeClass, isArrayType, readArrayElementsMethods inherited from interface org.apache.qpid.protonj2.codec.TypeDecoder
isArrayType, readArrayElements
-
Constructor Details
-
Binary32TypeDecoder
public Binary32TypeDecoder()
-
-
Method Details
-
getTypeCode
public int getTypeCode()- Returns:
- the AMQP Encoding Code that this primitive type decoder can read.
-
readSize
Description copied from interface:BinaryTypeDecoderReads the encoded size value for the encoded binary payload and returns it. The read is destructive and theTypeDecoderread methods cannot be called after this unless theProtonBufferis reset via a position marker. This method can be useful when the caller intends to manually read the binary payload from the givenProtonBuffer.- Specified by:
readSizein interfaceBinaryTypeDecoder- Specified by:
readSizein classAbstractBinaryTypeDecoder- Parameters:
buffer- the buffer from which the binary encoded size should be read.- Returns:
- the size of the binary payload that is encoded in the given
ProtonBuffer. - Throws:
DecodeException- if an error occurs while reading the binary size.
-
readSize
Description copied from interface:BinaryTypeDecoderReads the encoded size value for the encoded binary payload and returns it. The read is destructive and theTypeDecoderread methods cannot be called after this unless theInputStreamis reset via a position marker. This method can be useful when the caller intends to manually read the binary payload from the givenInputStream.- Specified by:
readSizein interfaceBinaryTypeDecoder- Specified by:
readSizein classAbstractBinaryTypeDecoder- Parameters:
stream- the stream from which the binary encoded size should be read.- Returns:
- the size of the binary payload that is encoded in the given
InputStream.
-