StreamEncodeable (Grails 3.3.8)
Date: 2018-08-10

Package: org.grails.encoder

## [Java] Interface StreamEncodeable

- Marks a class capable of encoding itself with given Encoder to given EncodedAppender instance

  Authors:
    Lari Hotari
  Since:
    2.3

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `void` | `encodeTo(EncodedAppender appender, Encoder encoder)` Calls the encoder to encode the current content of the StreamEncodable instance (itself) to the EncodedAppender.

- - ### Method Detail

    - #### public void encodeTo(EncodedAppender appender, Encoder encoder)

      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.

      throws:
        IOException Signals that an I/O exception has occurred.
      Parameters:
        `appender` - the EncodedAppender instance
        `encoder` - the encoder