java.nio.channels

Interface WritableByteChannel

public interface WritableByteChannel extends Channel

Method Summary
intwrite(ByteBuffer src)
Writes a sequence of bytes to this channel from the given buffer

Method Detail

write

public int write(ByteBuffer src)
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