Module 

Class ChannelOutputStream

java.lang.Object
java.io.OutputStream
org.xnio.streams.ChannelOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class ChannelOutputStream extends OutputStream
An output stream which writes to a stream sink channel. All write operations are directly performed upon the channel, so for optimal performance, a buffering output stream should be used to wrap this class.
Since:
1.2
  • Field Details

  • Constructor Details

    • ChannelOutputStream

      public ChannelOutputStream(StreamSinkChannel channel)
      Construct a new instance. No write timeout is configured.
      Parameters:
      channel - the channel to wrap
    • ChannelOutputStream

      public ChannelOutputStream(StreamSinkChannel channel, long timeout, TimeUnit unit)
      Construct a new instance.
      Parameters:
      channel - the channel to wrap
      timeout - the write timeout
      unit - the write timeout units
  • Method Details