org.mortbay.http.nio

Class SocketChannelOutputStream


public class SocketChannelOutputStream
extends 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(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)

Constructor Details

SocketChannelOutputStream

public SocketChannelOutputStream(SocketChannel channel,
                                 int bufferSize)
Constructor.

Method Details

close

public void close()
            throws IOException

destroy

public void destroy()

flush

public void flush()
            throws IOException

write

public void write(byte[] buf)
            throws IOException

write

public void write(byte[] buf,
                  int offset,
                  int length)
            throws IOException

write

public void write(int b)
            throws IOException

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