Class ShortSerializer

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

public class ShortSerializer
extends Object
implements Serializer<Short>
  • Constructor Details

    • ShortSerializer

      public ShortSerializer()
  • Method Details

    • serialize

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