Interface DataSink

    • Method Detail

      • consume

        default void consume​(byte[] data,
                             Entry entry)
                      throws KunaiException
        write given data to this instance.
        Parameters:
        data - writing data
        entry - meta data of data
        Throws:
        KunaiException - I/O error
      • consume

        default void consume​(Entry entry)
                      throws KunaiException
        write data from the given entry to this instance.
        Parameters:
        entry - writing data and its meta data
        Throws:
        KunaiException - I/O error
      • consume

        default void consume​(DataSource source)
        write given data entries to this instance.
        Parameters:
        source - writing data
      • close

        void close()
            throws IOException
        closes this instance. After the calling this method, writing data of this instance causes the I/O error.
        Specified by:
        close in interface AutoCloseable
        Throws:
        IOException - I/O error