Class ByteOutputContext

  • All Implemented Interfaces:
    java.lang.AutoCloseable, OutputContext

    public class ByteOutputContext
    extends ByteTransferContext
    implements OutputContext
    Container for multiple output streams. Represents a transfer context on sender-side.

    Public methods are thread safe, although the execution order may not be linearized if they were called from different threads.

    • Method Detail

      • close

        public final void close()
                         throws java.io.IOException
        Closes this stream.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface OutputContext
        Throws:
        java.io.IOException - if an exception was set
      • onChannelError

        public final void onChannelError​(@Nullable
                                         java.lang.Throwable cause)
        Description copied from class: ByteTransferContext
        Handles exception.
        Specified by:
        onChannelError in class ByteTransferContext
        Parameters:
        cause - the cause of exception handling