Class Map32TypeDecoder
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.Map32TypeDecoder
- All Implemented Interfaces:
MapTypeDecoder,PrimitiveTypeDecoder<Map>,StreamTypeDecoder<Map>,TypeDecoder<Map>
Decoder of AMQP Map value from a byte stream
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintreadCount(InputStream stream) Reads the count of entries in the encoded Map.intreadCount(ProtonBuffer buffer) Reads the count of entries in the encoded Map.intreadSize(InputStream stream) Reads the encoded size of the underlying Map type.intreadSize(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, 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.MapTypeDecoder
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
-
Map32TypeDecoder
public Map32TypeDecoder()
-
-
Method Details
-
getTypeCode
public int getTypeCode()- Returns:
- the AMQP Encoding Code that this primitive type decoder can read.
-
readSize
Description copied from interface:MapTypeDecoderReads 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
Description copied from interface:MapTypeDecoderReads 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
Description copied from interface:MapTypeDecoderReads 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
Description copied from interface:MapTypeDecoderReads 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
-