public interface AsyncInputStream
See the com.mongodb.async.client.gridfs.helpers
package for adapters that create an AsyncInputStream
Modifier and Type | Method and Description |
---|---|
void |
close(SingleResultCallback<java.lang.Void> callback)
Closes the input stream
|
void |
read(java.nio.ByteBuffer dst,
SingleResultCallback<java.lang.Integer> callback)
Reads a sequence of bytes from this stream into the given buffer.
|
void read(java.nio.ByteBuffer dst, SingleResultCallback<java.lang.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<java.lang.Void> callback)
callback
- the callback that indicates when the stream has been closed