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

All Implemented Interfaces:
    Closeable, Flushable

An optimized buffered outputstream for Tcp
 public NIOOutputStream(WritableByteChannel out) 
    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.
    out - the underlying output stream.
    size - the buffer size.
    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