public interface MongoGridFsClient
MongoGridFsClient delete(String id, Handler<AsyncResult<Void>> resultHandler)
id - the identifier of the fileresultHandler - will be called when the file is deletedMongoGridFsClient downloadByFileName(WriteStream<Buffer> stream, String fileName, Handler<AsyncResult<Long>> resultHandler)
MongoGridFsClient downloadByFileNameWithOptions(WriteStream<Buffer> stream, String fileName, GridFsDownloadOptions options, Handler<AsyncResult<Long>> resultHandler)
MongoGridFsClient downloadById(WriteStream<Buffer> stream, String id, Handler<AsyncResult<Long>> resultHandler)
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 bytesMongoGridFsClient 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 bytesMongoGridFsClient downloadFileByID(String id, String fileName, Handler<AsyncResult<Long>> resultHandler)
id - the GridFs Object ID of the file to downloadresultHandler - called when the file is downloaded and returns the length in bytesMongoGridFsClient drop(Handler<AsyncResult<Void>> resultHandler)
resultHandler - called when the bucket is droppedMongoGridFsClient findAllIds(Handler<AsyncResult<List<String>>> resultHandler)
resultHandler - called when the list of file ids is availableMongoGridFsClient 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 availableMongoGridFsClient uploadByFileName(ReadStream<Buffer> stream, String fileName, Handler<AsyncResult<String>> resultHandler)
MongoGridFsClient uploadByFileNameWithOptions(ReadStream<Buffer> stream, String fileName, GridFsUploadOptions options, Handler<AsyncResult<String>> resultHandler)
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 uploadedMongoGridFsClient 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 uploadedvoid close()
Copyright © 2019 Eclipse. All rights reserved.