Class AbstractValuePlainWriter
- java.lang.Object
-
- io.aiven.kafka.connect.common.output.plainwriter.AbstractValuePlainWriter
-
- All Implemented Interfaces:
OutputFieldPlainWriter
- Direct Known Subclasses:
Base64ValuePlainWriter,ValuePlainWriter
public abstract class AbstractValuePlainWriter extends java.lang.Object implements OutputFieldPlainWriter
-
-
Constructor Summary
Constructors Constructor Description AbstractValuePlainWriter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract byte[]getOutputBytes(byte[] value)voidwrite(org.apache.kafka.connect.sink.SinkRecord record, java.io.OutputStream outputStream)Takes theSinkRecord's value 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 value as a byte array.If the value is
null, it outputs nothing.If the value is not
null, it assumes the value is a byte array.- Specified by:
writein interfaceOutputFieldPlainWriter- Parameters:
record- the record to get the value fromoutputStream- the stream to write to- Throws:
org.apache.kafka.connect.errors.DataException- when the value is not actually a byte arrayjava.io.IOException
-
getOutputBytes
protected abstract byte[] getOutputBytes(byte[] value)
-
-