Class GridFSFile


  • public class GridFSFile
    extends java.lang.Object
    • Method Detail

      • getObjectId

        public ObjectId getObjectId()
        The ObjectId for this file. Throws a MongoGridFSException if the file id is not an ObjectId.
        Returns:
        the id for this file.
      • getId

        public java.lang.Object getId()
        The BsonValue id for this file.
        Returns:
        the id for this file
      • getFilename

        public java.lang.String getFilename()
        The filename
        Returns:
        the filename
      • getLength

        public long getLength()
        The length, in bytes of this file
        Returns:
        the length, in bytes of this file
      • getChunkSize

        public int getChunkSize()
        The size, in bytes, of each data chunk of this file
        Returns:
        the size, in bytes, of each data chunk of this file
      • getUploadDate

        public java.util.Date getUploadDate()
        The date and time this file was added to GridFS
        Returns:
        the date and time this file was added to GridFS
      • getMetadata

        public JsonObject getMetadata()
        Any additional metadata stored along with the file
        Returns:
        the metadata document or null