Java com.mongodb.client.gridfs GridFSBucket fields, constructors, methods, implement or subclass

Example usage for Java com.mongodb.client.gridfs GridFSBucket fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.mongodb.client.gridfs GridFSBucket.

The text is from its open source code.

Method

voiddelete(ObjectId id)
Given a id , delete this stored file's files collection document and associated chunks from a GridFS bucket.
voiddelete(BsonValue id)
Given a id , delete this stored file's files collection document and associated chunks from a GridFS bucket.
voiddownloadToStream(ObjectId id, OutputStream destination)
Downloads the contents of the stored file specified by id and writes the contents to the destination Stream.
voiddownloadToStream(BsonValue id, OutputStream destination)
Downloads the contents of the stored file specified by id and writes the contents to the destination Stream.
voiddownloadToStream(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.
voiddownloadToStreamByName(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.
voiddownloadToStreamByName(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.
GridFSFindIterablefind(Bson filter)
Finds all documents in the collection that match the filter.
GridFSFindIterablefind(ClientSession clientSession)
Finds all documents in the files collection.
GridFSFindIterablefind()
Finds all documents in the files collection.
StringgetBucketName()
The bucket name.
GridFSDownloadStreamopenDownloadStream(ObjectId id)
Opens a Stream from which the application can read the contents of the stored file specified by id .
GridFSDownloadStreamopenDownloadStream(BsonValue id)
Opens a Stream from which the application can read the contents of the stored file specified by id .
GridFSDownloadStreamopenDownloadStream(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 .
GridFSDownloadStreamopenDownloadStreamByName(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 .
GridFSDownloadStreamopenDownloadStreamByName(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 .
GridFSUploadStreamopenUploadStream(String filename, GridFSUploadOptions options)
Opens a Stream that the application can write the contents of the file to.
GridFSUploadStreamopenUploadStream(BsonValue id, String filename)
Opens a Stream that the application can write the contents of the file to.
GridFSUploadStreamopenUploadStream(ClientSession clientSession, String filename)
Opens a Stream that the application can write the contents of the file to.
GridFSUploadStreamopenUploadStream(String filename)
Opens a Stream that the application can write the contents of the file to.
voidrename(ObjectId id, String newFilename)
Renames the stored file with the specified id .
voidrename(BsonValue id, String newFilename)
Renames the stored file with the specified id .
ObjectIduploadFromStream(String filename, InputStream source, GridFSUploadOptions options)
Uploads the contents of the given InputStream to a GridFS bucket.
voiduploadFromStream(BsonValue id, String filename, InputStream source)
Uploads the contents of the given InputStream to a GridFS bucket.
ObjectIduploadFromStream(ClientSession clientSession, String filename, InputStream source)
Uploads the contents of the given InputStream to a GridFS bucket.
ObjectIduploadFromStream(String filename, InputStream source)
Uploads the contents of the given InputStream to a GridFS bucket.