Example usage for Java com.mongodb.gridfs GridFS fields, constructors, methods, implement or subclass
The text is from its open source code.
int | DEFAULT_CHUNKSIZE File's chunk size |
String | DEFAULT_BUCKET Bucket to use for the collection namespaces |
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. |
GridFSInputFile | createFile(final byte[] data) Creates a file entry. |
GridFSInputFile | createFile(final File file) Creates a file entry. |
GridFSInputFile | createFile(final InputStream in) Creates a file entry. |
GridFSInputFile | createFile(final String filename) Creates a file entry. |
GridFSInputFile | createFile(final InputStream in, final boolean closeStreamOnPersist) Creates a file entry. |
GridFSInputFile | createFile(final InputStream in, final String filename) Creates a file entry. |
GridFSInputFile | createFile() This method creates an empty GridFSInputFile instance. |
GridFSDBFile | find(final ObjectId objectId) Finds one file matching the given objectId. |
List | find(final String filename) Finds a list of files matching the given filename. |
List | find(final DBObject query) Finds a list of files matching the given query. |
List | find(final String filename, final DBObject sort) Finds a list of files matching the given filename. |
List | find(final DBObject query, final DBObject sort) Finds a list of files matching the given query. |
GridFSDBFile | findOne(final ObjectId objectId) Finds one file matching the given objectId. |
GridFSDBFile | findOne(final String filename) Finds one file matching the given filename. |
GridFSDBFile | findOne(final DBObject query) Finds one file matching the given query. |
String | getBucketName() Gets the bucket name used in the collection's namespace. |
DB | getDB() Gets the database used. |
DBCursor | getFileList() Gets the list of files stored in this gridfs, sorted by filename. |
DBCursor | getFileList(final DBObject query) Gets a filtered list of files stored in this gridfs, sorted by filename. |
DBCursor | getFileList(final DBObject query, final DBObject sort) Gets a sorted, filtered list of files stored in this gridfs. |
void | remove(final ObjectId id) Removes the file matching the given id. |
void | remove(final String filename) Removes all files matching the given filename. |
void | remove(final DBObject query) Removes all files matching the given query. |