Package com.mongodb.client.gridfs.model
Class GridFSFile
java.lang.Object
com.mongodb.client.gridfs.model.GridFSFile
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
The GridFSFile
- Since:
- 3.1
-
Constructor Summary
ConstructorDescriptionGridFSFile
(BsonValue id, String filename, long length, int chunkSize, Date uploadDate, String md5, Document metadata) Deprecated.there is no replacement for this constructorGridFSFile
(BsonValue id, String filename, long length, int chunkSize, Date uploadDate, String md5, Document metadata, Document extraElements) Deprecated.there is no replacement for this constructor -
Method Summary
Modifier and TypeMethodDescriptionboolean
Deprecated.Deprecated.any aliases should be stored in the metadata document instead.int
Deprecated.The size, in bytes, of each data chunk of this fileDeprecated.content type information should be stored the metadata document instead.Deprecated.any extra information should be stored in the metadata document instead.Deprecated.The filenamegetId()
Deprecated.TheBsonValue
id for this file.long
Deprecated.The length, in bytes of this filegetMD5()
Deprecated.file hashing is deprecated and may be removed in the future.Deprecated.Any additional metadata stored along with the fileDeprecated.TheObjectId
for this file.Deprecated.The date and time this file was added to GridFSint
hashCode()
Deprecated.toString()
Deprecated.
-
Constructor Details
-
GridFSFile
@Deprecated public GridFSFile(BsonValue id, String filename, long length, int chunkSize, Date uploadDate, @Nullable String md5, Document metadata) Deprecated.there is no replacement for this constructorCreates a new GridFSFile- Parameters:
id
- the id of the filefilename
- the filenamelength
- the length, in bytes of the filechunkSize
- the chunkSize, in bytes of the fileuploadDate
- the upload date of the filemd5
- the hash of the files contentsmetadata
- the optional metadata for the file
-
GridFSFile
@Deprecated public GridFSFile(BsonValue id, String filename, long length, int chunkSize, Date uploadDate, @Nullable String md5, @Nullable Document metadata, @Nullable Document extraElements) Deprecated.there is no replacement for this constructorCreates a legacy implementation of the GridFSFileFor GridFS files created in older versions of the driver.
- Parameters:
id
- the id of the filefilename
- the filenamelength
- the length, in bytes of the filechunkSize
- the chunkSize, in bytes of the fileuploadDate
- the upload date of the filemd5
- the hash of the files contentsmetadata
- the optional metadata for the fileextraElements
- any extra data stored in the document
-
-
Method Details
-
getObjectId
Deprecated.TheObjectId
for this file. Throws a MongoGridFSException if the file id is not an ObjectId.- Returns:
- the id for this file.
-
getId
Deprecated.TheBsonValue
id for this file.- Returns:
- the id for this file
-
getFilename
Deprecated.The filename- Returns:
- the filename
-
getLength
public long getLength()Deprecated.The length, in bytes of this file- Returns:
- the length, in bytes of this file
-
getChunkSize
public int getChunkSize()Deprecated.The size, in bytes, of each data chunk of this file- Returns:
- the size, in bytes, of each data chunk of this file
-
getUploadDate
Deprecated.The date and time this file was added to GridFS- Returns:
- the date and time this file was added to GridFS
-
getMD5
Deprecated.file hashing is deprecated and may be removed in the future.The hash of the contents of the stored file- Returns:
- the hash of the contents of the stored file or null if hashing the contents was disabled.
-
getMetadata
Deprecated.Any additional metadata stored along with the file- Returns:
- the metadata document or null
-
getExtraElements
Deprecated.any extra information should be stored in the metadata document instead.All deprecated top level elements including any contentType or aliases data- Returns:
- the extra elements document or null
-
getContentType
Deprecated.content type information should be stored the metadata document instead.The content type of the file- Returns:
- the content type of the file
-
getAliases
Deprecated.any aliases should be stored in the metadata document instead.The aliases for the file- Returns:
- the aliases of the file
-
equals
Deprecated. -
hashCode
public int hashCode()Deprecated. -
toString
Deprecated.
-