Example usage for Java com.mongodb.client.gridfs GridFSBucket fields, constructors, methods, implement or subclass
The text is from its open source code.
void | delete(ObjectId id) Given a id , delete this stored file's files collection document and associated chunks from a GridFS bucket. |
void | delete(BsonValue id) Given a id , delete this stored file's files collection document and associated chunks from a GridFS bucket. |
void | downloadToStream(ObjectId id, OutputStream destination) Downloads the contents of the stored file specified by id and writes the contents to the destination Stream. |
void | downloadToStream(BsonValue id, OutputStream destination) Downloads the contents of the stored file specified by id and writes the contents to the destination Stream. |
void | downloadToStream(String filename, OutputStream destination) Downloads the contents of the latest version of the stored file specified by filename and writes the contents to the destination Stream. |
void | downloadToStreamByName(String filename, OutputStream destination, com.mongodb.client.gridfs.model.GridFSDownloadByNameOptions options) Downloads the contents of the stored file specified by filename and by the revision in options and writes the contents to the destination Stream. |
void | downloadToStreamByName(String filename, OutputStream destination) Downloads the contents of the latest version of the stored file specified by filename and writes the contents to the destination Stream. |
GridFSFindIterable | find(Bson filter) Finds all documents in the collection that match the filter. |
GridFSFindIterable | find(ClientSession clientSession) Finds all documents in the files collection. |
GridFSFindIterable | find() Finds all documents in the files collection. |
String | getBucketName() The bucket name. |
GridFSDownloadStream | openDownloadStream(ObjectId id) Opens a Stream from which the application can read the contents of the stored file specified by id . |
GridFSDownloadStream | openDownloadStream(BsonValue id) Opens a Stream from which the application can read the contents of the stored file specified by id . |
GridFSDownloadStream | openDownloadStream(String filename) Opens a Stream from which the application can read the contents of the latest version of the stored file specified by the filename . |
GridFSDownloadStream | openDownloadStreamByName(String filename, com.mongodb.client.gridfs.model.GridFSDownloadByNameOptions options) Opens a Stream from which the application can read the contents of the stored file specified by filename and the revision in options . |
GridFSDownloadStream | openDownloadStreamByName(String filename) Opens a Stream from which the application can read the contents of the latest version of the stored file specified by the filename . |
GridFSUploadStream | openUploadStream(String filename, GridFSUploadOptions options) Opens a Stream that the application can write the contents of the file to. |
GridFSUploadStream | openUploadStream(BsonValue id, String filename) Opens a Stream that the application can write the contents of the file to. |
GridFSUploadStream | openUploadStream(ClientSession clientSession, String filename) Opens a Stream that the application can write the contents of the file to. |
GridFSUploadStream | openUploadStream(String filename) Opens a Stream that the application can write the contents of the file to. |
void | rename(ObjectId id, String newFilename) Renames the stored file with the specified id . |
void | rename(BsonValue id, String newFilename) Renames the stored file with the specified id . |
ObjectId | uploadFromStream(String filename, InputStream source, GridFSUploadOptions options) Uploads the contents of the given InputStream to a GridFS bucket. |
void | uploadFromStream(BsonValue id, String filename, InputStream source) Uploads the contents of the given InputStream to a GridFS bucket. |
ObjectId | uploadFromStream(ClientSession clientSession, String filename, InputStream source) Uploads the contents of the given InputStream to a GridFS bucket. |
ObjectId | uploadFromStream(String filename, InputStream source) Uploads the contents of the given InputStream to a GridFS bucket. |