GridFSDownloadStream
public interface AsyncInputStream
See the com.mongodb.async.client.gridfs.helpers
package for adapters that create an AsyncInputStream
Modifier and Type | Method | Description |
---|---|---|
void |
close(SingleResultCallback<Void> callback) |
Closes the input stream
|
void |
read(ByteBuffer dst,
SingleResultCallback<Integer> callback) |
Reads a sequence of bytes from this stream into the given buffer.
|
void read(ByteBuffer dst, SingleResultCallback<Integer> callback)
dst
- the destination buffercallback
- the callback returning the total number of bytes read into the buffer, or
-1
if there is no more data because the end of the stream has been reached.void close(SingleResultCallback<Void> callback)
callback
- the callback that indicates when the stream has been closed