public class MongoGridFsClient extends Object
Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<MongoGridFsClient> |
__TYPE_ARG |
Constructor and Description |
---|
MongoGridFsClient(MongoGridFsClient delegate) |
MongoGridFsClient(Object delegate) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the client and release its resources
|
Completable |
delete(String id)
Deletes a file by it's ID
|
Single<Long> |
downloadByFileName(WriteStream<Buffer> stream,
String fileName) |
Single<Long> |
downloadByFileNameWithOptions(WriteStream<Buffer> stream,
String fileName,
GridFsDownloadOptions options) |
Single<Long> |
downloadById(WriteStream<Buffer> stream,
String id) |
Single<Long> |
downloadFile(String fileName)
Downloads a file.
|
Single<Long> |
downloadFileAs(String fileName,
String newFileName)
Downloads a file and gives it a new name.
|
Single<Long> |
downloadFileByID(String id,
String fileName)
Downloads a file using the ID generated by GridFs.
|
Completable |
drop()
Drops the entire file bucket with all of its contents
|
boolean |
equals(Object o) |
Single<List<String>> |
findAllIds()
Finds all file ids in the bucket
|
Single<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> |
rxUploadByFileNameWithOptions(Flowable<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() |
Single<String> |
uploadByFileName(Flowable<Buffer> stream,
String fileName) |
Single<String> |
uploadByFileNameWithOptions(Flowable<Buffer> stream,
String fileName,
GridFsUploadOptions options) |
Single<String> |
uploadFile(String fileName)
Upload a file to gridfs
|
Single<String> |
uploadFileWithOptions(String fileName,
GridFsUploadOptions options)
Upload a file to gridfs with options
|
public static final io.vertx.lang.rx.TypeArg<MongoGridFsClient> __TYPE_ARG
public MongoGridFsClient(MongoGridFsClient delegate)
public MongoGridFsClient(Object delegate)
public MongoGridFsClient getDelegate()
public Completable delete(String id)
id
- the identifier of the filepublic Completable rxDelete(String id)
id
- the identifier of the filepublic ReadStream<Buffer> readByFileName(String fileName)
fileName
- public ReadStream<Buffer> readByFileNameWithOptions(String fileName, GridFsDownloadOptions options)
fileName
- options
- public ReadStream<Buffer> readById(String id)
id
- public Single<Long> downloadByFileName(WriteStream<Buffer> stream, String fileName)
public Single<Long> rxDownloadByFileName(WriteStream<Buffer> stream, String fileName)
public Single<Long> downloadByFileNameWithOptions(WriteStream<Buffer> stream, String fileName, GridFsDownloadOptions options)
public Single<Long> rxDownloadByFileNameWithOptions(WriteStream<Buffer> stream, String fileName, GridFsDownloadOptions options)
public Single<Long> downloadById(WriteStream<Buffer> stream, String id)
public Single<Long> rxDownloadById(WriteStream<Buffer> stream, String id)
public Single<Long> downloadFile(String fileName)
fileName
- the name of the file to downloadpublic Single<Long> rxDownloadFile(String fileName)
fileName
- the name of the file to downloadpublic Single<Long> downloadFileAs(String fileName, String newFileName)
fileName
- the name of the file to downloadnewFileName
- the name the file should be saved aspublic Single<Long> rxDownloadFileAs(String fileName, String newFileName)
fileName
- the name of the file to downloadnewFileName
- the name the file should be saved aspublic Single<Long> downloadFileByID(String id, String fileName)
id
- the GridFs Object ID of the file to downloadfileName
- public Single<Long> rxDownloadFileByID(String id, String fileName)
id
- the GridFs Object ID of the file to downloadfileName
- public Completable drop()
public Completable rxDrop()
public Single<List<String>> findIds(JsonObject query)
query
- a bson query expressed as json that will be used to match filespublic Single<List<String>> rxFindIds(JsonObject query)
query
- a bson query expressed as json that will be used to match filespublic Single<String> rxUploadByFileName(Flowable<Buffer> stream, String fileName)
public Single<String> uploadByFileNameWithOptions(Flowable<Buffer> stream, String fileName, GridFsUploadOptions options)
public Single<String> rxUploadByFileNameWithOptions(Flowable<Buffer> stream, String fileName, GridFsUploadOptions options)
public Single<String> uploadFile(String fileName)
fileName
- the name of the file to store in gridfspublic Single<String> rxUploadFile(String fileName)
fileName
- the name of the file to store in gridfspublic Single<String> uploadFileWithOptions(String fileName, GridFsUploadOptions options)
fileName
- the name of the file to store in gridfsoptions
- GridFsUploadOptions
for specifying metadata and chunk sizepublic Single<String> rxUploadFileWithOptions(String fileName, GridFsUploadOptions options)
fileName
- the name of the file to store in gridfsoptions
- GridFsUploadOptions
for specifying metadata and chunk sizepublic void close()
public static MongoGridFsClient newInstance(MongoGridFsClient arg)
Copyright © 2024 Eclipse. All rights reserved.