Class IntegerSerializer

java.lang.Object
org.apache.kafka.common.serialization.IntegerSerializer
All Implemented Interfaces:
Closeable, AutoCloseable, Serializer<Integer>

public class IntegerSerializer
extends Object
implements Serializer<Integer>
  • Constructor Details

    • IntegerSerializer

      public IntegerSerializer()
  • Method Details

    • serialize

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