Class Map8TypeDecoder
- java.lang.Object
-
- org.apache.qpid.protonj2.codec.decoders.AbstractPrimitiveTypeDecoder<Map>
-
- org.apache.qpid.protonj2.codec.decoders.primitives.AbstractMapTypeDecoder
-
- org.apache.qpid.protonj2.codec.decoders.primitives.Map8TypeDecoder
-
- All Implemented Interfaces:
MapTypeDecoder
,PrimitiveTypeDecoder<Map>
,StreamTypeDecoder<Map>
,TypeDecoder<Map>
public final class Map8TypeDecoder extends AbstractMapTypeDecoder
Decoder of AMQP small Map types from a byte stream
-
-
Constructor Summary
Constructors Constructor Description Map8TypeDecoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getTypeCode()
int
readCount(InputStream stream)
Reads the count of entries in the encoded Map.int
readCount(ProtonBuffer buffer)
Reads the count of entries in the encoded Map.int
readSize(InputStream stream)
Reads the encoded size of the underlying Map type.int
readSize(ProtonBuffer buffer)
Reads the encoded size of the underlying Map type.-
Methods inherited from class org.apache.qpid.protonj2.codec.decoders.primitives.AbstractMapTypeDecoder
readValue, readValue, 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.MapTypeDecoder
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:MapTypeDecoder
Reads the encoded size of the underlying Map type.- Parameters:
buffer
- The buffer containing the encoded Map type.- Returns:
- the size in bytes of the encoded Map.
- Throws:
DecodeException
- if an error occurs reading the value
-
readCount
public int readCount(ProtonBuffer buffer) throws DecodeException
Description copied from interface:MapTypeDecoder
Reads the count of entries in the encoded Map.This value is the total count of all key values pairs, and should always be an even number as Map types cannot be unbalanced.
- Parameters:
buffer
- The buffer containing the encoded Map type.- Returns:
- the number of elements that we encoded from the original Map.
- Throws:
DecodeException
- if an error occurs reading the value
-
readSize
public int readSize(InputStream stream) throws DecodeException
Description copied from interface:MapTypeDecoder
Reads the encoded size of the underlying Map type.- Parameters:
stream
- The InputStream containing the encoded Map type.- Returns:
- the size in bytes of the encoded Map.
- Throws:
DecodeException
- if an error occurs reading the value
-
readCount
public int readCount(InputStream stream) throws DecodeException
Description copied from interface:MapTypeDecoder
Reads the count of entries in the encoded Map.This value is the total count of all key values pairs, and should always be an even number as Map types cannot be unbalanced.
- Parameters:
stream
- The InputStream containing the encoded Map type.- Returns:
- the number of elements that we encoded from the original Map.
- Throws:
DecodeException
- if an error occurs reading the value
-
-