Class ByteBufferSerializer
java.lang.Object
org.apache.kafka.common.serialization.ByteBufferSerializer
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- Serializer<ByteBuffer>
ByteBufferSerializer always rewinds the position of the input buffer to zero for
 serialization. A manual rewind is not necessary.
 Note: any existing buffer position is ignored.
 The position is also rewound back to zero before serialize(String, ByteBuffer)
 returns.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbyte[]serialize(String topic, ByteBuffer data) Convertdatainto a byte array.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.kafka.common.serialization.Serializerclose, configure, serialize
- 
Constructor Details- 
ByteBufferSerializerpublic ByteBufferSerializer()
 
- 
- 
Method Details- 
serializeDescription copied from interface:SerializerConvertdatainto a byte array.- Specified by:
- serializein interface- Serializer<ByteBuffer>
- Parameters:
- topic- topic associated with data
- data- typed data
- Returns:
- serialized bytes
 
 
-