Interface MapTypeDecoder
- All Superinterfaces:
PrimitiveTypeDecoder<Map>
,StreamTypeDecoder<Map>
,TypeDecoder<Map>
- All Known Implementing Classes:
AbstractMapTypeDecoder
,Map32TypeDecoder
,Map8TypeDecoder
Base interface for all AMQP Map type value decoders.
-
Method Summary
Modifier and TypeMethodDescriptionint
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 interface org.apache.qpid.protonj2.codec.decoders.PrimitiveTypeDecoder
getTypeCode, isJavaPrimitive
Methods inherited from interface org.apache.qpid.protonj2.codec.StreamTypeDecoder
isArrayType, readArrayElements, readValue, skipValue
Methods inherited from interface org.apache.qpid.protonj2.codec.TypeDecoder
isArrayType, readArrayElements, readValue, skipValue
-
Method Details
-
getTypeClass
- Specified by:
getTypeClass
in interfaceStreamTypeDecoder<Map>
- Specified by:
getTypeClass
in interfaceTypeDecoder<Map>
- Returns:
- the Class that this decoder handles.
-
readSize
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
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
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
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
-