Interface Encoder<E>

    • Method Detail

      • init

        void init(OutputStream os)
           throws IOException
        This method is called when the owning appender starts or whenever output needs to be directed to a new OutputStream, for instance as a result of a rollover. Implementing encoders should at the very least remember the OutputStream passed as argument and use it in future operations.
        Parameters:
        os -
        Throws:
        IOException -
      • doEncode

        void doEncode(E event)
               throws IOException
        Encode and write an event to the appropriate OutputStream. Implementations are free to differ writing out of the encoded event and instead write in batches.
        Parameters:
        event -
        Throws:
        IOException -
      • close

        void close()
            throws IOException
        This method is called prior to the closing of the underling OutputStream. Implementations MUST not close the underlying OutputStream which is the responsibility of the owning appender.
        Throws:
        IOException -