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 an AsyncInputStream

    Since:
    3.3
    • 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 buffer
        callback - 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.
      • close

        void close​(SingleResultCallback<Void> callback)
        Deprecated. 
        Closes the input stream
        Parameters:
        callback - the callback that indicates when the stream has been closed