Class KeyPlainWriter
- java.lang.Object
-
- io.aiven.kafka.connect.common.output.plainwriter.KeyPlainWriter
-
- All Implemented Interfaces:
OutputFieldPlainWriter
public final class KeyPlainWriter extends java.lang.Object implements OutputFieldPlainWriter
-
-
Constructor Summary
Constructors Constructor Description KeyPlainWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidwrite(org.apache.kafka.connect.sink.SinkRecord record, java.io.OutputStream outputStream)Takes theSinkRecord's key as a byte array.
-
-
-
Method Detail
-
write
public void write(org.apache.kafka.connect.sink.SinkRecord record, java.io.OutputStream outputStream) throws java.io.IOExceptionTakes theSinkRecord's key as a byte array.If the key is
null, it outputs nothing.If the key is not
null, it assumes the key is a byte array.- Specified by:
writein interfaceOutputFieldPlainWriter- Parameters:
record- the record to get the key fromoutputStream- the stream to write to- Throws:
org.apache.kafka.connect.errors.DataException- when the key is not actually a byte arrayjava.io.IOException
-
-