Interface AsyncInputStream

  • All Known Subinterfaces:
    GridFSDownloadStream

    @Deprecated
    public interface AsyncInputStream
    Deprecated.
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    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.
      • 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 skip
        callback - 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