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
-
Method Summary
Modifier and TypeMethodDescriptionint
int
readSize
(InputStream stream) Reads the encoded size value for the encoded binary payload and returns it.int
readSize
(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, skipValue
Methods inherited from class org.apache.qpid.protonj2.codec.decoders.AbstractPrimitiveTypeDecoder
isArrayType, isJavaPrimitive, readArrayElements, readArrayElements
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.qpid.protonj2.codec.decoders.primitives.BinaryTypeDecoder
getTypeClass
Methods inherited from interface org.apache.qpid.protonj2.codec.decoders.PrimitiveTypeDecoder
isJavaPrimitive
Methods inherited from interface org.apache.qpid.protonj2.codec.StreamTypeDecoder
getTypeClass, isArrayType, readArrayElements
Methods 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:BinaryTypeDecoder
Reads the encoded size value for the encoded binary payload and returns it. The read is destructive and theTypeDecoder
read methods cannot be called after this unless theProtonBuffer
is 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:
readSize
in interfaceBinaryTypeDecoder
- Specified by:
readSize
in 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:BinaryTypeDecoder
Reads the encoded size value for the encoded binary payload and returns it. The read is destructive and theTypeDecoder
read methods cannot be called after this unless theInputStream
is 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:
readSize
in interfaceBinaryTypeDecoder
- Specified by:
readSize
in 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
.
-