Interface Encoder.BinaryStream<T>

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

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

    • encode

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