Package com.mongodb.async.client.gridfs
Interface AsyncInputStream
-
- All Known Subinterfaces:
GridFSDownloadStream
Deprecated.Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
@Deprecated public interface AsyncInputStream
The Async Input Stream interface represents some asynchronous input stream of bytes.See the
com.mongodb.async.client.gridfs.helpers
package for adapters that create anAsyncInputStream
- Since:
- 3.3
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
close(SingleResultCallback<Void> callback)
Deprecated.Closes the input streamvoid
read(ByteBuffer dst, SingleResultCallback<Integer> callback)
Deprecated.Reads a sequence of bytes from this stream into the given buffer.void
skip(long bytesToSkip, SingleResultCallback<Long> callback)
Deprecated.Skips over and discards n bytes of data from this input stream.
-
-
-
Method Detail
-
read
void read(ByteBuffer dst, SingleResultCallback<Integer> callback)
Deprecated.Reads a sequence of bytes from this stream into the given buffer.- Parameters:
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.
-
skip
void skip(long bytesToSkip, SingleResultCallback<Long> callback)
Deprecated.Skips over and discards n bytes of data from this input stream.- Parameters:
bytesToSkip
- the number of bytes to skipcallback
- the callback returning the actual number of bytes skipped- Since:
- 3.10
-
close
void close(SingleResultCallback<Void> callback)
Deprecated.Closes the input stream- Parameters:
callback
- the callback that indicates when the stream has been closed
-
-