public class MongoGridFsClient extends Object
Modifier and Type | Field and Description |
---|---|
static 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
|
MongoGridFsClient |
delete(String id)
Deletes a file by it's ID
|
MongoGridFsClient |
delete(String id,
Handler<AsyncResult<Void>> resultHandler)
Deletes a file by it's ID
|
MongoGridFsClient |
downloadByFileName(WriteStream<Buffer> stream,
String fileName) |
MongoGridFsClient |
downloadByFileName(WriteStream<Buffer> stream,
String fileName,
Handler<AsyncResult<Long>> resultHandler) |
MongoGridFsClient |
downloadByFileNameWithOptions(WriteStream<Buffer> stream,
String fileName,
GridFsDownloadOptions options) |
MongoGridFsClient |
downloadByFileNameWithOptions(WriteStream<Buffer> stream,
String fileName,
GridFsDownloadOptions options,
Handler<AsyncResult<Long>> resultHandler) |
MongoGridFsClient |
downloadById(WriteStream<Buffer> stream,
String id) |
MongoGridFsClient |
downloadById(WriteStream<Buffer> stream,
String id,
Handler<AsyncResult<Long>> resultHandler) |
MongoGridFsClient |
downloadFile(String fileName)
Downloads a file.
|
MongoGridFsClient |
downloadFile(String fileName,
Handler<AsyncResult<Long>> resultHandler)
Downloads a file.
|
MongoGridFsClient |
downloadFileAs(String fileName,
String newFileName)
Downloads a file and gives it a new name.
|
MongoGridFsClient |
downloadFileAs(String fileName,
String newFileName,
Handler<AsyncResult<Long>> resultHandler)
Downloads a file and gives it a new name.
|
MongoGridFsClient |
downloadFileByID(String id,
String fileName)
Downloads a file using the ID generated by GridFs.
|
MongoGridFsClient |
downloadFileByID(String id,
String fileName,
Handler<AsyncResult<Long>> resultHandler)
Downloads a file using the ID generated by GridFs.
|
MongoGridFsClient |
drop()
Drops the entire file bucket with all of its contents
|
MongoGridFsClient |
drop(Handler<AsyncResult<Void>> resultHandler)
Drops the entire file bucket with all of its contents
|
boolean |
equals(Object o) |
MongoGridFsClient |
findAllIds()
Finds all file ids in the bucket
|
MongoGridFsClient |
findAllIds(Handler<AsyncResult<List<String>>> resultHandler)
Finds all file ids in the bucket
|
MongoGridFsClient |
findIds(JsonObject query)
Finds all file ids that match a query.
|
MongoGridFsClient |
findIds(JsonObject query,
Handler<AsyncResult<List<String>>> resultHandler)
Finds all file ids that match a query.
|
MongoGridFsClient |
getDelegate() |
int |
hashCode() |
static MongoGridFsClient |
newInstance(MongoGridFsClient arg) |
io.reactivex.Completable |
rxDelete(String id)
Deletes a file by it's ID
|
io.reactivex.Single<Long> |
rxDownloadByFileName(WriteStream<Buffer> stream,
String fileName) |
io.reactivex.Single<Long> |
rxDownloadByFileNameWithOptions(WriteStream<Buffer> stream,
String fileName,
GridFsDownloadOptions options) |
io.reactivex.Single<Long> |
rxDownloadById(WriteStream<Buffer> stream,
String id) |
io.reactivex.Single<Long> |
rxDownloadFile(String fileName)
Downloads a file.
|
io.reactivex.Single<Long> |
rxDownloadFileAs(String fileName,
String newFileName)
Downloads a file and gives it a new name.
|
io.reactivex.Single<Long> |
rxDownloadFileByID(String id,
String fileName)
Downloads a file using the ID generated by GridFs.
|
io.reactivex.Completable |
rxDrop()
Drops the entire file bucket with all of its contents
|
io.reactivex.Single<List<String>> |
rxFindAllIds()
Finds all file ids in the bucket
|
io.reactivex.Single<List<String>> |
rxFindIds(JsonObject query)
Finds all file ids that match a query.
|
io.reactivex.Single<String> |
rxUploadByFileName(io.reactivex.Flowable<Buffer> stream,
String fileName) |
io.reactivex.Single<String> |
rxUploadByFileName(ReadStream<Buffer> stream,
String fileName) |
io.reactivex.Single<String> |
rxUploadByFileNameWithOptions(io.reactivex.Flowable<Buffer> stream,
String fileName,
GridFsUploadOptions options) |
io.reactivex.Single<String> |
rxUploadByFileNameWithOptions(ReadStream<Buffer> stream,
String fileName,
GridFsUploadOptions options) |
io.reactivex.Single<String> |
rxUploadFile(String fileName)
Upload a file to gridfs
|
io.reactivex.Single<String> |
rxUploadFileWithOptions(String fileName,
GridFsUploadOptions options)
Upload a file to gridfs with options
|
String |
toString() |
MongoGridFsClient |
uploadByFileName(io.reactivex.Flowable<Buffer> stream,
String fileName) |
MongoGridFsClient |
uploadByFileName(io.reactivex.Flowable<Buffer> stream,
String fileName,
Handler<AsyncResult<String>> resultHandler) |
MongoGridFsClient |
uploadByFileName(ReadStream<Buffer> stream,
String fileName) |
MongoGridFsClient |
uploadByFileName(ReadStream<Buffer> stream,
String fileName,
Handler<AsyncResult<String>> resultHandler) |
MongoGridFsClient |
uploadByFileNameWithOptions(io.reactivex.Flowable<Buffer> stream,
String fileName,
GridFsUploadOptions options) |
MongoGridFsClient |
uploadByFileNameWithOptions(io.reactivex.Flowable<Buffer> stream,
String fileName,
GridFsUploadOptions options,
Handler<AsyncResult<String>> resultHandler) |
MongoGridFsClient |
uploadByFileNameWithOptions(ReadStream<Buffer> stream,
String fileName,
GridFsUploadOptions options) |
MongoGridFsClient |
uploadByFileNameWithOptions(ReadStream<Buffer> stream,
String fileName,
GridFsUploadOptions options,
Handler<AsyncResult<String>> resultHandler) |
MongoGridFsClient |
uploadFile(String fileName)
Upload a file to gridfs
|
MongoGridFsClient |
uploadFile(String fileName,
Handler<AsyncResult<String>> resultHandler)
Upload a file to gridfs
|
MongoGridFsClient |
uploadFileWithOptions(String fileName,
GridFsUploadOptions options)
Upload a file to gridfs with options
|
MongoGridFsClient |
uploadFileWithOptions(String fileName,
GridFsUploadOptions options,
Handler<AsyncResult<String>> resultHandler)
Upload a file to gridfs with options
|
public static final TypeArg<MongoGridFsClient> __TYPE_ARG
public MongoGridFsClient(MongoGridFsClient delegate)
public MongoGridFsClient(Object delegate)
public MongoGridFsClient getDelegate()
public MongoGridFsClient delete(String id, Handler<AsyncResult<Void>> resultHandler)
id
- the identifier of the fileresultHandler
- will be called when the file is deletedpublic MongoGridFsClient delete(String id)
id
- the identifier of the filepublic io.reactivex.Completable rxDelete(String id)
id
- the identifier of the filepublic MongoGridFsClient downloadByFileName(WriteStream<Buffer> stream, String fileName, Handler<AsyncResult<Long>> resultHandler)
public MongoGridFsClient downloadByFileName(WriteStream<Buffer> stream, String fileName)
public io.reactivex.Single<Long> rxDownloadByFileName(WriteStream<Buffer> stream, String fileName)
public MongoGridFsClient downloadByFileNameWithOptions(WriteStream<Buffer> stream, String fileName, GridFsDownloadOptions options, Handler<AsyncResult<Long>> resultHandler)
public MongoGridFsClient downloadByFileNameWithOptions(WriteStream<Buffer> stream, String fileName, GridFsDownloadOptions options)
public io.reactivex.Single<Long> rxDownloadByFileNameWithOptions(WriteStream<Buffer> stream, String fileName, GridFsDownloadOptions options)
public MongoGridFsClient downloadById(WriteStream<Buffer> stream, String id, Handler<AsyncResult<Long>> resultHandler)
public MongoGridFsClient downloadById(WriteStream<Buffer> stream, String id)
public io.reactivex.Single<Long> rxDownloadById(WriteStream<Buffer> stream, String id)
public MongoGridFsClient downloadFile(String fileName, Handler<AsyncResult<Long>> resultHandler)
fileName
- the name of the file to downloadresultHandler
- called when the file is downloaded and returns the length in bytespublic MongoGridFsClient downloadFile(String fileName)
fileName
- the name of the file to downloadpublic io.reactivex.Single<Long> rxDownloadFile(String fileName)
fileName
- the name of the file to downloadpublic MongoGridFsClient downloadFileAs(String fileName, String newFileName, Handler<AsyncResult<Long>> resultHandler)
fileName
- the name of the file to downloadnewFileName
- the name the file should be saved asresultHandler
- called when the file is downloaded and returns the length in bytespublic MongoGridFsClient downloadFileAs(String fileName, String newFileName)
fileName
- the name of the file to downloadnewFileName
- the name the file should be saved aspublic io.reactivex.Single<Long> rxDownloadFileAs(String fileName, String newFileName)
fileName
- the name of the file to downloadnewFileName
- the name the file should be saved aspublic MongoGridFsClient downloadFileByID(String id, String fileName, Handler<AsyncResult<Long>> resultHandler)
id
- the GridFs Object ID of the file to downloadfileName
- resultHandler
- called when the file is downloaded and returns the length in bytespublic MongoGridFsClient downloadFileByID(String id, String fileName)
id
- the GridFs Object ID of the file to downloadfileName
- public io.reactivex.Single<Long> rxDownloadFileByID(String id, String fileName)
id
- the GridFs Object ID of the file to downloadfileName
- public MongoGridFsClient drop(Handler<AsyncResult<Void>> resultHandler)
resultHandler
- called when the bucket is droppedpublic MongoGridFsClient drop()
public io.reactivex.Completable rxDrop()
public MongoGridFsClient findAllIds(Handler<AsyncResult<List<String>>> resultHandler)
resultHandler
- called when the list of file ids is availablepublic MongoGridFsClient findAllIds()
public io.reactivex.Single<List<String>> rxFindAllIds()
public MongoGridFsClient findIds(JsonObject query, Handler<AsyncResult<List<String>>> resultHandler)
query
- a bson query expressed as json that will be used to match filesresultHandler
- called when the list of file ids is availablepublic MongoGridFsClient findIds(JsonObject query)
query
- a bson query expressed as json that will be used to match filespublic io.reactivex.Single<List<String>> rxFindIds(JsonObject query)
query
- a bson query expressed as json that will be used to match filespublic MongoGridFsClient uploadByFileName(ReadStream<Buffer> stream, String fileName, Handler<AsyncResult<String>> resultHandler)
public MongoGridFsClient uploadByFileName(ReadStream<Buffer> stream, String fileName)
public io.reactivex.Single<String> rxUploadByFileName(ReadStream<Buffer> stream, String fileName)
public MongoGridFsClient uploadByFileName(io.reactivex.Flowable<Buffer> stream, String fileName, Handler<AsyncResult<String>> resultHandler)
public MongoGridFsClient uploadByFileName(io.reactivex.Flowable<Buffer> stream, String fileName)
public io.reactivex.Single<String> rxUploadByFileName(io.reactivex.Flowable<Buffer> stream, String fileName)
public MongoGridFsClient uploadByFileNameWithOptions(ReadStream<Buffer> stream, String fileName, GridFsUploadOptions options, Handler<AsyncResult<String>> resultHandler)
public MongoGridFsClient uploadByFileNameWithOptions(ReadStream<Buffer> stream, String fileName, GridFsUploadOptions options)
public io.reactivex.Single<String> rxUploadByFileNameWithOptions(ReadStream<Buffer> stream, String fileName, GridFsUploadOptions options)
public MongoGridFsClient uploadByFileNameWithOptions(io.reactivex.Flowable<Buffer> stream, String fileName, GridFsUploadOptions options, Handler<AsyncResult<String>> resultHandler)
public MongoGridFsClient uploadByFileNameWithOptions(io.reactivex.Flowable<Buffer> stream, String fileName, GridFsUploadOptions options)
public io.reactivex.Single<String> rxUploadByFileNameWithOptions(io.reactivex.Flowable<Buffer> stream, String fileName, GridFsUploadOptions options)
public MongoGridFsClient uploadFile(String fileName, Handler<AsyncResult<String>> resultHandler)
fileName
- the name of the file to store in gridfsresultHandler
- the id of the file that was uploadedpublic MongoGridFsClient uploadFile(String fileName)
fileName
- the name of the file to store in gridfspublic io.reactivex.Single<String> rxUploadFile(String fileName)
fileName
- the name of the file to store in gridfspublic MongoGridFsClient uploadFileWithOptions(String fileName, GridFsUploadOptions options, Handler<AsyncResult<String>> resultHandler)
fileName
- the name of the file to store in gridfsoptions
- GridFsUploadOptions
for specifying metadata and chunk sizeresultHandler
- the id of the file that was uploadedpublic MongoGridFsClient uploadFileWithOptions(String fileName, GridFsUploadOptions options)
fileName
- the name of the file to store in gridfsoptions
- GridFsUploadOptions
for specifying metadata and chunk sizepublic io.reactivex.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 © 2020 Eclipse. All rights reserved.