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

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

Introduction

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

The text is from its open source code.

Subclass

com.mongodb.gridfs.GridFS has subclasses.
Click this link to see all its subclasses.

Field

intDEFAULT_CHUNKSIZE
File's chunk size
StringDEFAULT_BUCKET
Bucket to use for the collection namespaces

Constructor

GridFS(final DB db, final String bucket)
Creates a GridFS instance for the specified bucket in the given database.
GridFS(final DB db)
Creates a GridFS instance for the default bucket "fs" in the given database.

Method

GridFSInputFilecreateFile(final byte[] data)
Creates a file entry.
GridFSInputFilecreateFile(final File file)
Creates a file entry.
GridFSInputFilecreateFile(final InputStream in)
Creates a file entry.
GridFSInputFilecreateFile(final String filename)
Creates a file entry.
GridFSInputFilecreateFile(final InputStream in, final boolean closeStreamOnPersist)
Creates a file entry.
GridFSInputFilecreateFile(final InputStream in, final String filename)
Creates a file entry.
GridFSInputFilecreateFile()
This method creates an empty GridFSInputFile instance.
GridFSDBFilefind(final ObjectId objectId)
Finds one file matching the given objectId.
Listfind(final String filename)
Finds a list of files matching the given filename.
Listfind(final DBObject query)
Finds a list of files matching the given query.
Listfind(final String filename, final DBObject sort)
Finds a list of files matching the given filename.
Listfind(final DBObject query, final DBObject sort)
Finds a list of files matching the given query.
GridFSDBFilefindOne(final ObjectId objectId)
Finds one file matching the given objectId.
GridFSDBFilefindOne(final String filename)
Finds one file matching the given filename.
GridFSDBFilefindOne(final DBObject query)
Finds one file matching the given query.
StringgetBucketName()
Gets the bucket name used in the collection's namespace.
DBgetDB()
Gets the database used.
DBCursorgetFileList()
Gets the list of files stored in this gridfs, sorted by filename.
DBCursorgetFileList(final DBObject query)
Gets a filtered list of files stored in this gridfs, sorted by filename.
DBCursorgetFileList(final DBObject query, final DBObject sort)
Gets a sorted, filtered list of files stored in this gridfs.
voidremove(final ObjectId id)
Removes the file matching the given id.
voidremove(final String filename)
Removes all files matching the given filename.
voidremove(final DBObject query)
Removes all files matching the given query.