Class AbstractValuePlainWriter

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract byte[] getOutputBytes​(byte[] value)  
      void write​(org.apache.kafka.connect.sink.SinkRecord record, java.io.OutputStream outputStream)
      Takes the SinkRecord's value as a byte array.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractValuePlainWriter

        public AbstractValuePlainWriter()
    • Method Detail

      • write

        public void write​(org.apache.kafka.connect.sink.SinkRecord record,
                          java.io.OutputStream outputStream)
                   throws java.io.IOException
        Takes the SinkRecord'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:
        write in interface OutputFieldPlainWriter
        Parameters:
        record - the record to get the value from
        outputStream - the stream to write to
        Throws:
        org.apache.kafka.connect.errors.DataException - when the value is not actually a byte array
        java.io.IOException
      • getOutputBytes

        protected abstract byte[] getOutputBytes​(byte[] value)