Home » activemq-parent-5.3.1-source-release » org.apache » activemq » transport » nio » [javadoc | source]
org.apache.activemq.transport.nio
public class: NIOOutputStream [javadoc | source]
java.lang.Object
   java.io.OutputStream
      org.apache.activemq.transport.nio.NIOOutputStream

All Implemented Interfaces:
    Closeable, Flushable

An optimized buffered outputstream for Tcp
Constructor:
 public NIOOutputStream(WritableByteChannel out) 
    Constructor
    Parameters:
    out -
 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 from org.apache.activemq.transport.nio.NIOOutputStream Summary:
checkClosed,   close,   flush,   write,   write,   write
Methods from java.io.OutputStream:
close,   flush,   write,   write,   write
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.activemq.transport.nio.NIOOutputStream Detail:
 protected  void checkClosed() throws IOException 
    Checks that the stream has not been closed
 public  void close() throws IOException 
    close this stream
 public  void flush() throws IOException 
    flush the data to the output stream This doesn't call flush on the underlying outputstream, because Tcp is particularly efficent at doing this itself ....
 public  void write(int b) throws IOException 
    write a byte on to the stream
 protected  void write(ByteBuffer data) throws IOException 
 public  void write(byte[] b,
    int off,
    int len) throws IOException 
    write a byte array to the stream