Class ByteArraySerializer

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

public class ByteArraySerializer extends Object implements Serializer<byte[]>
  • Constructor Details

    • ByteArraySerializer

      public ByteArraySerializer()
  • Method Details

    • serialize

      public byte[] serialize(String topic, byte[] data)
      Description copied from interface: Serializer
      Convert data into a byte array.
      Specified by:
      serialize in interface Serializer<byte[]>
      Parameters:
      topic - topic associated with data
      data - typed data
      Returns:
      serialized bytes