Interface Encoder.TextStream<T>

Type Parameters:
T - The type of object accepted by the encoder
All Superinterfaces:
Encoder
Enclosing interface:
Encoder

public static interface Encoder.TextStream<T> extends Encoder
An encoder that encodes an object of type T into a text WebSocket message written to a Writer.
  • Method Details

    • encode

      void encode(T object, Writer writer) throws EncodeException, IOException
      Encodes the given object and writes the result to the writer.
      Parameters:
      object - The object to encode
      writer - The writer to write the encoded data to
      Throws:
      EncodeException - If the object cannot be encoded
      IOException - If an I/O error occurs