Class ListDeserializer<Inner>
java.lang.Object
org.apache.kafka.common.serialization.ListDeserializer<Inner>
- All Implemented Interfaces:
Closeable,AutoCloseable,Deserializer<List<Inner>>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close this deserializer.voidConfigure this class.deserialize(String topic, byte[] data) Deserialize a record value from a byte array into a value or object.deserialize(String topic, Headers headers, byte[] data) Deserialize a record value from a byte array into a value or object.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.kafka.common.serialization.Deserializer
deserialize
-
Constructor Details
-
ListDeserializer
public ListDeserializer() -
ListDeserializer
-
-
Method Details
-
innerDeserializer
-
configure
Description copied from interface:DeserializerConfigure this class.- Specified by:
configurein interfaceDeserializer<Inner>- Parameters:
configs- configs in key/value pairsisKey- whether the deserializer is used for the key or the value
-
deserialize
Description copied from interface:DeserializerDeserialize a record value from a byte array into a value or object.It is recommended to deserialize a
nullbyte array to anullobject.- Specified by:
deserializein interfaceDeserializer<Inner>- Parameters:
topic- topic associated with the datadata- serialized bytes; may benull- Returns:
- deserialized typed data; may be
null
-
deserialize
Description copied from interface:DeserializerDeserialize a record value from a byte array into a value or object.It is recommended to deserialize a
nullbyte array to anullobject.Note that the passed in
Headersmay be empty, but nevernull. The implementation is allowed to modify the passed in headers, as a side effect of deserialization. It is considered best practice to not delete or modify existing headers, but rather only add new ones.- Specified by:
deserializein interfaceDeserializer<Inner>- Parameters:
topic- topic associated with the dataheaders- headers associated with the recorddata- serialized bytes; may benull- Returns:
- deserialized typed data; may be
null
-
close
public void close()Description copied from interface:DeserializerClose this deserializer.This method must be idempotent as it may be called multiple times.
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceDeserializer<Inner>
-