Package io.vertx.reactivex.ext.mongo

## Class MongoGridFsClient

- java.lang.Object
- - io.vertx.reactivex.ext.mongo.MongoGridFsClient

- All Implemented Interfaces:
    `io.vertx.lang.rx.RxDelegate`

      public class MongoGridFsClient
      extends Object
      implements io.vertx.lang.rx.RxDelegate

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static io.vertx.lang.rx.TypeArg<MongoGridFsClient>` | `__TYPE_ARG` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `MongoGridFsClient​(MongoGridFsClient delegate)` |
    `MongoGridFsClient​(Object delegate)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `close()` | Close the client and release its resources
    `Future<Void>` | `delete​(String id)` | Deletes a file by it's ID
    `Future<Long>` | `downloadByFileName​(WriteStream<Buffer> stream, String fileName)` |
    `Future<Long>` | `downloadByFileNameWithOptions​(WriteStream<Buffer> stream, String fileName, GridFsDownloadOptions options)` |
    `Future<Long>` | `downloadById​(WriteStream<Buffer> stream, String id)` |
    `Future<Long>` | `downloadFile​(String fileName)` | Downloads a file.
    `Future<Long>` | `downloadFileAs​(String fileName, String newFileName)` | Downloads a file and gives it a new name.
    `Future<Long>` | `downloadFileByID​(String id, String fileName)` | Downloads a file using the ID generated by GridFs.
    `Future<Void>` | `drop()` | Drops the entire file bucket with all of its contents
    `boolean` | `equals​(Object o)` |
    `Future<List<String>>` | `findAllIds()` | Finds all file ids in the bucket
    `Future<List<String>>` | `findIds​(JsonObject query)` | Finds all file ids that match a query.
    `MongoGridFsClient` | `getDelegate()` |
    `int` | `hashCode()` |
    `static MongoGridFsClient` | `newInstance​(MongoGridFsClient arg)` |
    `ReadStream<Buffer>` | `readByFileName​(String fileName)` | Read file by name to ReadStream
    `ReadStream<Buffer>` | `readByFileNameWithOptions​(String fileName, GridFsDownloadOptions options)` | Read file by name to ReadStream with options
    `ReadStream<Buffer>` | `readById​(String id)` | Read file by id to ReadStream
    `Completable` | `rxDelete​(String id)` | Deletes a file by it's ID
    `Single<Long>` | `rxDownloadByFileName​(WriteStream<Buffer> stream, String fileName)` |
    `Single<Long>` | `rxDownloadByFileNameWithOptions​(WriteStream<Buffer> stream, String fileName, GridFsDownloadOptions options)` |
    `Single<Long>` | `rxDownloadById​(WriteStream<Buffer> stream, String id)` |
    `Single<Long>` | `rxDownloadFile​(String fileName)` | Downloads a file.
    `Single<Long>` | `rxDownloadFileAs​(String fileName, String newFileName)` | Downloads a file and gives it a new name.
    `Single<Long>` | `rxDownloadFileByID​(String id, String fileName)` | Downloads a file using the ID generated by GridFs.
    `Completable` | `rxDrop()` | Drops the entire file bucket with all of its contents
    `Single<List<String>>` | `rxFindAllIds()` | Finds all file ids in the bucket
    `Single<List<String>>` | `rxFindIds​(JsonObject query)` | Finds all file ids that match a query.
    `Single<String>` | `rxUploadByFileName​(Flowable<Buffer> stream, String fileName)` |
    `Single<String>` | `rxUploadByFileName​(ReadStream<Buffer> stream, String fileName)` |
    `Single<String>` | `rxUploadByFileNameWithOptions​(Flowable<Buffer> stream, String fileName, GridFsUploadOptions options)` |
    `Single<String>` | `rxUploadByFileNameWithOptions​(ReadStream<Buffer> stream, String fileName, GridFsUploadOptions options)` |
    `Single<String>` | `rxUploadFile​(String fileName)` | Upload a file to gridfs
    `Single<String>` | `rxUploadFileWithOptions​(String fileName, GridFsUploadOptions options)` | Upload a file to gridfs with options
    `String` | `toString()` |
    `Future<String>` | `uploadByFileName​(Flowable<Buffer> stream, String fileName)` |
    `Future<String>` | `uploadByFileName​(ReadStream<Buffer> stream, String fileName)` |
    `Future<String>` | `uploadByFileNameWithOptions​(Flowable<Buffer> stream, String fileName, GridFsUploadOptions options)` |
    `Future<String>` | `uploadByFileNameWithOptions​(ReadStream<Buffer> stream, String fileName, GridFsUploadOptions options)` |
    `Future<String>` | `uploadFile​(String fileName)` | Upload a file to gridfs
    `Future<String>` | `uploadFileWithOptions​(String fileName, GridFsUploadOptions options)` | Upload a file to gridfs with options

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<MongoGridFsClient> __TYPE_ARG

  - ### Constructor Detail

    - #### MongoGridFsClient

          public MongoGridFsClient​(MongoGridFsClient delegate)

    - #### MongoGridFsClient

          public MongoGridFsClient​(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals​(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public MongoGridFsClient getDelegate()

      Specified by:
        `getDelegate` in interface `io.vertx.lang.rx.RxDelegate`

    - #### delete

          public Future<Void> delete​(String id)

      Deletes a file by it's ID
      Parameters:
        `id` - the identifier of the file
      Returns:
        a future notified when the operation completes

    - #### rxDelete

          public Completable rxDelete​(String id)

      Deletes a file by it's ID
      Parameters:
        `id` - the identifier of the file
      Returns:
        a future notified when the operation completes

    - #### readByFileName

          public ReadStream<Buffer> readByFileName​(String fileName)

      Read file by name to ReadStream
      Parameters:
        `fileName` -
      Returns:

    - #### readByFileNameWithOptions

          public ReadStream<Buffer> readByFileNameWithOptions​(String fileName,
                                                              GridFsDownloadOptions options)

      Read file by name to ReadStream with options
      Parameters:
        `fileName` -
        `options` -
      Returns:

    - #### readById

          public ReadStream<Buffer> readById​(String id)

      Read file by id to ReadStream
      Parameters:
        `id` -
      Returns:

    - #### downloadByFileName

          public Future<Long> downloadByFileName​(WriteStream<Buffer> stream,
                                                 String fileName)

    - #### rxDownloadByFileName

          public Single<Long> rxDownloadByFileName​(WriteStream<Buffer> stream,
                                                   String fileName)

    - #### downloadByFileNameWithOptions

          public Future<Long> downloadByFileNameWithOptions​(WriteStream<Buffer> stream,
                                                            String fileName,
                                                            GridFsDownloadOptions options)

    - #### rxDownloadByFileNameWithOptions

          public Single<Long> rxDownloadByFileNameWithOptions​(WriteStream<Buffer> stream,
                                                              String fileName,
                                                              GridFsDownloadOptions options)

    - #### downloadById

          public Future<Long> downloadById​(WriteStream<Buffer> stream,
                                           String id)

    - #### rxDownloadById

          public Single<Long> rxDownloadById​(WriteStream<Buffer> stream,
                                             String id)

    - #### downloadFile

          public Future<Long> downloadFile​(String fileName)

      Downloads a file.
      Parameters:
        `fileName` - the name of the file to download
      Returns:
        a future notified with the result

    - #### rxDownloadFile

          public Single<Long> rxDownloadFile​(String fileName)

      Downloads a file.
      Parameters:
        `fileName` - the name of the file to download
      Returns:
        a future notified with the result

    - #### downloadFileAs

          public Future<Long> downloadFileAs​(String fileName,
                                             String newFileName)

      Downloads a file and gives it a new name.
      Parameters:
        `fileName` - the name of the file to download
        `newFileName` - the name the file should be saved as
      Returns:
        a future notified with the result

    - #### rxDownloadFileAs

          public Single<Long> rxDownloadFileAs​(String fileName,
                                               String newFileName)

      Downloads a file and gives it a new name.
      Parameters:
        `fileName` - the name of the file to download
        `newFileName` - the name the file should be saved as
      Returns:
        a future notified with the result

    - #### downloadFileByID

          public Future<Long> downloadFileByID​(String id,
                                               String fileName)

      Downloads a file using the ID generated by GridFs.
      Parameters:
        `id` - the GridFs Object ID of the file to download
        `fileName` -
      Returns:
        a future notified with the result

    - #### rxDownloadFileByID

          public Single<Long> rxDownloadFileByID​(String id,
                                                 String fileName)

      Downloads a file using the ID generated by GridFs.
      Parameters:
        `id` - the GridFs Object ID of the file to download
        `fileName` -
      Returns:
        a future notified with the result

    - #### drop

          public Future<Void> drop()

      Drops the entire file bucket with all of its contents
      Returns:
        a future notified when the operation completes

    - #### rxDrop

          public Completable rxDrop()

      Drops the entire file bucket with all of its contents
      Returns:
        a future notified when the operation completes

    - #### findAllIds

          public Future<List<String>> findAllIds()

      Finds all file ids in the bucket
      Returns:
        a future notified with the result

    - #### rxFindAllIds

          public Single<List<String>> rxFindAllIds()

      Finds all file ids in the bucket
      Returns:
        a future notified with the result

    - #### findIds

          public Future<List<String>> findIds​(JsonObject query)

      Finds all file ids that match a query.
      Parameters:
        `query` - a bson query expressed as json that will be used to match files
      Returns:
        a future notified with the result

    - #### rxFindIds

          public Single<List<String>> rxFindIds​(JsonObject query)

      Finds all file ids that match a query.
      Parameters:
        `query` - a bson query expressed as json that will be used to match files
      Returns:
        a future notified with the result

    - #### uploadByFileName

          public Future<String> uploadByFileName​(ReadStream<Buffer> stream,
                                                 String fileName)

    - #### rxUploadByFileName

          public Single<String> rxUploadByFileName​(ReadStream<Buffer> stream,
                                                   String fileName)

    - #### uploadByFileName

          public Future<String> uploadByFileName​(Flowable<Buffer> stream,
                                                 String fileName)

    - #### rxUploadByFileName

          public Single<String> rxUploadByFileName​(Flowable<Buffer> stream,
                                                   String fileName)

    - #### uploadByFileNameWithOptions

          public Future<String> uploadByFileNameWithOptions​(ReadStream<Buffer> stream,
                                                            String fileName,
                                                            GridFsUploadOptions options)

    - #### rxUploadByFileNameWithOptions

          public Single<String> rxUploadByFileNameWithOptions​(ReadStream<Buffer> stream,
                                                              String fileName,
                                                              GridFsUploadOptions options)

    - #### uploadByFileNameWithOptions

          public Future<String> uploadByFileNameWithOptions​(Flowable<Buffer> stream,
                                                            String fileName,
                                                            GridFsUploadOptions options)

    - #### rxUploadByFileNameWithOptions

          public Single<String> rxUploadByFileNameWithOptions​(Flowable<Buffer> stream,
                                                              String fileName,
                                                              GridFsUploadOptions options)

    - #### uploadFile

          public Future<String> uploadFile​(String fileName)

      Upload a file to gridfs
      Parameters:
        `fileName` - the name of the file to store in gridfs
      Returns:
        a future notified with the result

    - #### rxUploadFile

          public Single<String> rxUploadFile​(String fileName)

      Upload a file to gridfs
      Parameters:
        `fileName` - the name of the file to store in gridfs
      Returns:
        a future notified with the result

    - #### uploadFileWithOptions

          public Future<String> uploadFileWithOptions​(String fileName,
                                                      GridFsUploadOptions options)

      Upload a file to gridfs with options
      Parameters:
        `fileName` - the name of the file to store in gridfs
        `options` - `GridFsUploadOptions` for specifying metadata and chunk size
      Returns:
        a future notified with the result

    - #### rxUploadFileWithOptions

          public Single<String> rxUploadFileWithOptions​(String fileName,
                                                        GridFsUploadOptions options)

      Upload a file to gridfs with options
      Parameters:
        `fileName` - the name of the file to store in gridfs
        `options` - `GridFsUploadOptions` for specifying metadata and chunk size
      Returns:
        a future notified with the result

    - #### close

          public void close()

      Close the client and release its resources

    - #### newInstance

          public static MongoGridFsClient newInstance​(MongoGridFsClient arg)