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>
public final class Binary32TypeDecoder extends AbstractBinaryTypeDecoder
Decoder of AMQP Binary values from a byte stream.
-
-
Constructor Summary
Constructors Constructor Description Binary32TypeDecoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetTypeCode()intreadSize(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, 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
-
-
-
-
Method Detail
-
getTypeCode
public int getTypeCode()
- Returns:
- the AMQP Encoding Code that this primitive type decoder can read.
-
readSize
public int readSize(ProtonBuffer buffer) throws DecodeException
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
public int readSize(InputStream stream)
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.
-
-