Interface StreamEncodeable

  • All Known Implementing Classes:
    StreamCharBuffer

    public interface StreamEncodeable
    Marks a class capable of encoding itself with given Encoder to given EncodedAppender instance
    Since:
    2.3
    • Method Detail

      • encodeTo

        void encodeTo​(EncodedAppender appender,
                      Encoder encoder)
               throws java.io.IOException
        Calls the encoder to encode the current content of the StreamEncodable instance (itself) to the EncodedAppender. It is recommended that the implementation checks if Encoder is a StreamingEncoder instance and takes use of that interface.
        Parameters:
        appender - the EncodedAppender instance
        encoder - the encoder
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.