packagech.qos.logback.core.encoder;publicinterfaceEncoder<E>extendsContextAware,LifeCycle{/** * 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.*/voidinit(OutputStreamos)throwsIOException;/** * Encode and write an event to the appropriate {@link OutputStream}. * Implementations are free to defer writing out of the encoded event and * instead write in batches.*/voiddoEncode(Eevent)throwsIOException;/** * This method is called prior to the closing of the underling * {@link OutputStream}. Implementations MUST not close the underlying * {@link OutputStream} which is the responsibility of the owning appender.*/voidclose()throwsIOException;}