Interface MessageOutput<T>

Type Parameters:
T - the type of output produced
All Known Subinterfaces:
MessageOutput.Buffer

public sealed interface MessageOutput<T> permits MessageOutput.Buffer (not exhaustive)

A container for the in-memory output produced by a MessageWriter.

To create a MessageOutput, call one of its ofXxx methods. To pass the MessageOutput to a message writer, call MessageWriter.of(java.nio.channels.WritableByteChannel). To obtain the produced output, call get() after the message writer has been closed.

Producing in-memory output requires buffer copying. For best performance, use a message writer that writes to a WritableByteChannel or OutputStream.