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