public class IntegerSerializer extends java.lang.Object implements Serializer<java.lang.Integer>
Constructor and Description |
---|
IntegerSerializer() |
public void configure(java.util.Map<java.lang.String,?> configs, boolean isKey)
Serializer
configure
in interface Serializer<java.lang.Integer>
configs
- configs in key/value pairsisKey
- whether is for key or valuepublic byte[] serialize(java.lang.String topic, java.lang.Integer data)
Serializer
data
into a byte array.serialize
in interface Serializer<java.lang.Integer>
topic
- topic associated with datadata
- typed datapublic void close()
Serializer
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface Serializer<java.lang.Integer>