Interface GridFSDownloadStream

  • All Superinterfaces:
    AsyncInputStream

    @Deprecated
    public interface GridFSDownloadStream
    extends AsyncInputStream
    Deprecated.
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    A GridFS InputStream for downloading data from GridFS

    Provides the GridFSFile for the file to being downloaded as well as the read methods of a AsyncInputStream

    Since:
    3.3
    • Method Detail

      • getGridFSFile

        void getGridFSFile​(SingleResultCallback<GridFSFile> callback)
        Deprecated.
        Gets the corresponding GridFSFile for the file being downloaded
        Parameters:
        callback - that returns the corresponding GridFSFile for the file being downloaded
      • batchSize

        GridFSDownloadStream batchSize​(int batchSize)
        Deprecated.
        Sets the number of chunks to return per batch.

        Can be used to control the memory consumption of this InputStream. The smaller the batchSize the lower the memory consumption and higher latency.

        Parameters:
        batchSize - the batch size
        Returns:
        this
        MongoDB documentation
        Batch Size