java.lang.Object | |
↳ | com.mongodb.gridfs.GridFSFile |
Known Direct Subclasses |
The abstract class representing a GridFS file
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
_fs |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Checks if this object contains a field with the given name.
| |||||||||||
Deprecated
| |||||||||||
Gets a field from this object by a given name.
| |||||||||||
Gets the aliases from the metadata.
| |||||||||||
Gets the size of a chunk
| |||||||||||
Gets the content type
| |||||||||||
Gets the filename
| |||||||||||
Gets the id
| |||||||||||
Gets the file's length
| |||||||||||
Gets the observed MD5 during transfer
| |||||||||||
Gets the file metadata
| |||||||||||
Gets the upload date
| |||||||||||
whether markAsPartialObject was ever called
only matters if you are going to upsert and do not want to risk losing fields
| |||||||||||
Returns this object's fields' names
| |||||||||||
if this object was retrieved with only some fields (using a field filter)
this method will be called to mark it as such.
| |||||||||||
Returns the number of chunks that store the file data
| |||||||||||
Sets a name/value pair in this object.
| |||||||||||
Sets all key/value pairs from a map into this object
| |||||||||||
Sets all key/value pairs from an object into this object
| |||||||||||
Removes a field with a given name from this object.
| |||||||||||
Saves the file entry to the files collection
| |||||||||||
Gets the file metadata
| |||||||||||
Returns a map representing this BSONObject.
| |||||||||||
Verifies that the MD5 matches between the database and the local file.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Sets the GridFS associated with this file
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.mongodb.DBObject
| |||||||||||
From interface
org.bson.BSONObject
|
Checks if this object contains a field with the given name.
s | Field name for which to check |
---|
Gets a field from this object by a given name.
key | The name of the field fetch |
---|
Gets the aliases from the metadata.
note: to set aliases, call put( "aliases" , List
Gets the size of a chunk
Gets the file's length
whether markAsPartialObject was ever called only matters if you are going to upsert and do not want to risk losing fields
Returns this object's fields' names
if this object was retrieved with only some fields (using a field filter) this method will be called to mark it as such.
Returns the number of chunks that store the file data
Sets a name/value pair in this object.
key | Name to set |
---|---|
v | Corresponding value |
Sets all key/value pairs from a map into this object
m | the map |
---|
Sets all key/value pairs from an object into this object
o | the object |
---|
Removes a field with a given name from this object.
key | The name of the field to remove |
---|
Saves the file entry to the files collection
Verifies that the MD5 matches between the database and the local file. This should be called after transferring a file.
MongoException |
---|