Class GridFSUploadStream

    • Constructor Detail

      • GridFSUploadStream

        public GridFSUploadStream()
    • Method Detail

      • getObjectId

        public abstract ObjectId getObjectId()
        Gets the ObjectId for the file to be uploaded or throws an error if an alternative BsonType has been used for the id. Throws a MongoGridFSException if the file id is not an ObjectId.
        Returns:
        the ObjectId for the file to be uploaded
      • getId

        public abstract BsonValue getId()
        Gets the BsonValue for the file to be uploaded
        Returns:
        the BsonValue for the file to be uploaded
      • abort

        public abstract void abort()
        Aborts the upload and deletes any data.
      • write

        public abstract void write​(int b)
        Specified by:
        write in class OutputStream
      • write

        public abstract void write​(byte[] b)
        Overrides:
        write in class OutputStream
      • write

        public abstract void write​(byte[] b,
                                   int off,
                                   int len)
        Overrides:
        write in class OutputStream