37 |
|
|
38 |
package java.nio.channels; |
package java.nio.channels; |
39 |
|
|
40 |
|
import java.io.IOException; |
41 |
|
import java.nio.ByteBuffer; |
42 |
|
|
43 |
import java.io.*; |
public interface WritableByteChannel |
44 |
import java.nio.*; |
extends Channel |
|
|
|
|
|
|
|
public interface WritableByteChannel extends Channel |
|
45 |
{ |
{ |
46 |
public int write(ByteBuffer src) throws IOException; |
/** |
47 |
|
* Writes a sequence of bytes to this channel from the given buffer |
48 |
|
* |
49 |
|
* @exception AsynchronousCloseException If another thread closes this |
50 |
|
* channel while the write operation is in progress |
51 |
|
* @exception ClosedByInterruptException If another thread interrupts the |
52 |
|
* current thread while the write operation is in progress, thereby closing |
53 |
|
* the channel and setting the current thread's interrupt status |
54 |
|
* @exception ClosedChannelException If this channel is closed |
55 |
|
* @exception IOException If an error occurs |
56 |
|
* @exception NonWritableChannelException If this channel was not opened for |
57 |
|
* writing |
58 |
|
*/ |
59 |
|
public int write(ByteBuffer src) throws IOException; |
60 |
} |
} |