org.apache.kafka.common.serialization
Class ByteArraySerializer

java.lang.Object
  extended by org.apache.kafka.common.serialization.ByteArraySerializer
All Implemented Interfaces:
Serializer<byte[]>

public class ByteArraySerializer
extends java.lang.Object
implements Serializer<byte[]>


Constructor Summary
ByteArraySerializer()
           
 
Method Summary
 void close()
          Close this serializer
 void configure(java.util.Map<java.lang.String,?> configs, boolean isKey)
          Configure this class.
 byte[] serialize(java.lang.String topic, byte[] data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArraySerializer

public ByteArraySerializer()
Method Detail

configure

public void configure(java.util.Map<java.lang.String,?> configs,
                      boolean isKey)
Description copied from interface: Serializer
Configure this class.

Specified by:
configure in interface Serializer<byte[]>
Parameters:
configs - configs in key/value pairs
isKey - whether is for key or value

serialize

public byte[] serialize(java.lang.String topic,
                        byte[] data)
Specified by:
serialize in interface Serializer<byte[]>
Parameters:
topic - topic associated with data
data - typed data
Returns:
serialized bytes

close

public void close()
Description copied from interface: Serializer
Close this serializer

Specified by:
close in interface Serializer<byte[]>