Class NIOOutputStream

java.lang.Object
java.io.OutputStream
org.apache.activemq.transport.nio.NIOOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable, TimeStampStream

public class NIOOutputStream extends OutputStream implements TimeStampStream
An optimized buffered OutputStream for TCP/IP
  • Constructor Details

    • NIOOutputStream

      public NIOOutputStream(WritableByteChannel out)
      Constructor
      Parameters:
      out - the channel to write data to.
    • NIOOutputStream

      public NIOOutputStream(WritableByteChannel out, int size)
      Creates a new buffered output stream to write data to the specified underlying output stream with the specified buffer size.
      Parameters:
      out - the underlying output stream.
      size - the buffer size.
      Throws:
      IllegalArgumentException - if size <= 0.
  • Method Details