Home | History | Annotate | Download | only in channels

Lines Matching defs:read

32  * An asynchronous channel that can read and write bytes.
34 * <p> Some channels may not allow more than one read or write to be outstanding
35 * at any given time. If a thread invokes a read method before a previous read
39 * I/O operations may proceed concurrently with a read operation depends upon
43 * multiple concurrent threads. When a read or write operation is initiated then
59 * <p> This method initiates an asynchronous read operation to read a
61 * handler} parameter is a completion handler that is invoked when the read
63 * handler is the number of bytes read or {@code -1} if no bytes could be
64 * read because the channel has reached end-of-stream.
66 * <p> The read operation may read up to <i>r</i> bytes from the channel,
68 * {@code dst.remaining()} at the time that the read is attempted. Where
69 * <i>r</i> is 0, the read operation completes immediately with a result of
72 * <p> Suppose that a byte sequence of length <i>n</i> is read, where
77 * where <i>p</i> is the buffer's position at the moment the read is
86 * allow more than one read to be outstanding at any given time. If a thread
87 * initiates a read operation before a previous read operation has
100 * If the buffer is read-only
102 * If the channel does not allow more than one read to be outstanding
103 * and a previous read has not completed
108 <A> void read(ByteBuffer dst,
115 * <p> This method initiates an asynchronous read operation to read a
118 * #read(ByteBuffer,Object,CompletionHandler)
119 * read(ByteBuffer,Object,CompletionHandler)} method except that instead
122 * get} method returns the number of bytes read or {@code -1} if no bytes
123 * could be read because the channel has reached end-of-stream.
131 * If the buffer is read-only
133 * If the channel does not allow more than one read to be outstanding
134 * and a previous read has not completed
136 Future<Integer> read(ByteBuffer dst);