org.mortbay.http.nio
Class SocketChannelOutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended byorg.mortbay.http.nio.SocketChannelOutputStream

public class SocketChannelOutputStream
extends java.io.OutputStream

Blocking output stream on non-blocking SocketChannel. Makes the assumption that writes will rarely need to block. All writes flush to the channel, and no additional buffering is done.

Version:
$Revision: 1.4 $
Author:
gregw

Constructor Summary
SocketChannelOutputStream(java.nio.channels.SocketChannel channel, int bufferSize)
          Constructor.
 
Method Summary
 void close()
           
 void destroy()
           
 void flush()
           
 void write(byte[] buf)
           
 void write(byte[] buf, int offset, int length)
           
 void write(int b)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocketChannelOutputStream

public SocketChannelOutputStream(java.nio.channels.SocketChannel channel,
                                 int bufferSize)
Constructor.

Method Detail

write

public void write(int b)
           throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(byte[] buf,
                  int offset,
                  int length)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(byte[] buf)
           throws java.io.IOException
Throws:
java.io.IOException

destroy

public void destroy()


Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.