java.nio.channels
Interface WritableByteChannel

All Superinterfaces:
Channel, Closeable
All Known Subinterfaces:
ByteChannel, GatheringByteChannel
All Known Implementing Classes:
DatagramChannel, FileChannel, Pipe.SinkChannel, SocketChannel

public interface WritableByteChannel
extends Channel


Method Summary
 int write(ByteBuffer src)
          Writes a sequence of bytes to this channel from the given buffer
 
Methods inherited from interface java.nio.channels.Channel
close, isOpen
 

Method Detail

write

int write(ByteBuffer src)
          throws IOException
Writes a sequence of bytes to this channel from the given buffer

Throws:
AsynchronousCloseException - If another thread closes this channel while the write operation is in progress
ClosedByInterruptException - If another thread interrupts the current thread while the write operation is in progress, thereby closing the channel and setting the current thread's interrupt status
ClosedChannelException - If this channel is closed
IOException - If an error occurs
NonWritableChannelException - If this channel was not opened for writing