Class KeyPlainWriter
java.lang.Object
io.aiven.kafka.connect.common.output.plainwriter.KeyPlainWriter
- All Implemented Interfaces:
OutputFieldPlainWriter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidwrite(org.apache.kafka.connect.sink.SinkRecord record, OutputStream outputStream) Takes theSinkRecord's key as a byte array.
-
Constructor Details
-
KeyPlainWriter
public KeyPlainWriter()
-
-
Method Details
-
write
public void write(org.apache.kafka.connect.sink.SinkRecord record, OutputStream outputStream) throws IOException Takes 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 arrayIOException
-