Packages

case class GridFSBucket(wrapped: com.mongodb.async.client.gridfs.GridFSBucket) extends Product with Serializable

Represents a GridFS Bucket

Since

1.2

Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GridFSBucket
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new GridFSBucket(wrapped: com.mongodb.async.client.gridfs.GridFSBucket)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. lazy val bucketName: String

    The bucket name.

    The bucket name.

    returns

    the bucket name

  6. lazy val chunkSizeBytes: Int

    Sets the chunk size in bytes.

    Sets the chunk size in bytes. Defaults to 255.

    returns

    the chunk size in bytes.

  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  8. def delete(clientSession: ClientSession, id: BsonValue): Observable[Completed]

    Given a id, delete this stored file's files collection document and associated chunks from a GridFS bucket.

    Given a id, delete this stored file's files collection document and associated chunks from a GridFS bucket.

    clientSession

    the client session with which to associate this operation

    id

    the ObjectId of the file to be deleted

    returns

    a Observable with a single element indicating when the operation has completed

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  9. def delete(clientSession: ClientSession, id: ObjectId): Observable[Completed]

    Given a id, delete this stored file's files collection document and associated chunks from a GridFS bucket.

    Given a id, delete this stored file's files collection document and associated chunks from a GridFS bucket.

    clientSession

    the client session with which to associate this operation

    id

    the ObjectId of the file to be deleted

    returns

    a Observable with a single element indicating when the operation has completed

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  10. def delete(id: BsonValue): Observable[Completed]

    Given a id, delete this stored file's files collection document and associated chunks from a GridFS bucket.

    Given a id, delete this stored file's files collection document and associated chunks from a GridFS bucket.

    id

    the ObjectId of the file to be deleted

    returns

    a Observable with a single element indicating when the operation has completed

  11. def delete(id: ObjectId): Observable[Completed]

    Given a id, delete this stored file's files collection document and associated chunks from a GridFS bucket.

    Given a id, delete this stored file's files collection document and associated chunks from a GridFS bucket.

    id

    the ObjectId of the file to be deleted

    returns

    a Observable with a single element indicating when the operation has completed

  12. lazy val disableMD5: Boolean

    Returns true if computing MD5 checksums when uploading files is disabled.

    Returns true if computing MD5 checksums when uploading files is disabled.

    returns

    true if computing MD5 checksums when uploading files is disabled.

    Since

    2.4

  13. def downloadToObservable(clientSession: ClientSession, filename: String, options: GridFSDownloadOptions): GridFSDownloadObservable

    Downloads the contents of the stored file specified by filename and by the revision in options into the Observable.

    Downloads the contents of the stored file specified by filename and by the revision in options into the Observable.

    clientSession

    the client session with which to associate this operation

    filename

    the name of the file to be downloaded

    options

    the download options

    returns

    a Observable with a single element, representing the amount of data written

    Since

    2.8

    Note

    Requires MongoDB 3.6 or greater

  14. def downloadToObservable(clientSession: ClientSession, filename: String): GridFSDownloadObservable

    Downloads the contents of the latest version of the stored file specified by filename into the Observable.

    Downloads the contents of the latest version of the stored file specified by filename into the Observable.

    clientSession

    the client session with which to associate this operation

    filename

    the name of the file to be downloaded

    returns

    a Observable with a single element, representing the amount of data written

    Since

    2.8

    Note

    Requires MongoDB 3.6 or greater

  15. def downloadToObservable(clientSession: ClientSession, id: BsonValue): GridFSDownloadObservable

    Downloads the contents of the stored file specified by id into the Observable.

    Downloads the contents of the stored file specified by id into the Observable.

    clientSession

    the client session with which to associate this operation

    id

    the custom id of the file, to be written to the destination stream

    returns

    a Observable with a single element, representing the amount of data written

    Since

    2.8

    Note

    Requires MongoDB 3.6 or greater

  16. def downloadToObservable(clientSession: ClientSession, id: ObjectId): GridFSDownloadObservable

    Downloads the contents of the stored file specified by id into the Observable.

    Downloads the contents of the stored file specified by id into the Observable.

    clientSession

    the client session with which to associate this operation

    id

    the ObjectId of the file to be written to the destination stream

    returns

    a Observable with a single element, representing the amount of data written

    Since

    2.8

    Note

    Requires MongoDB 3.6 or greater

  17. def downloadToObservable(filename: String, options: GridFSDownloadOptions): GridFSDownloadObservable

    Downloads the contents of the stored file specified by filename and by the revision in options into the Observable.

    Downloads the contents of the stored file specified by filename and by the revision in options into the Observable.

    filename

    the name of the file to be downloaded

    options

    the download options

    returns

    a Observable with a single element, representing the amount of data written

    Since

    2.8

  18. def downloadToObservable(filename: String): GridFSDownloadObservable

    Downloads the contents of the stored file specified by filename into the Observable.

    Downloads the contents of the stored file specified by filename into the Observable.

    filename

    the name of the file to be downloaded

    returns

    a Observable with a single element, representing the amount of data written

    Since

    2.8

  19. def downloadToObservable(id: BsonValue): GridFSDownloadObservable

    Downloads the contents of the stored file specified by id into the Observable.

    Downloads the contents of the stored file specified by id into the Observable.

    id

    the custom id of the file, to be written to the destination stream

    returns

    a Observable with a single element, representing the amount of data written

    Since

    2.8

  20. def downloadToObservable(id: ObjectId): GridFSDownloadObservable

    Downloads the contents of the stored file specified by id into the Observable.

    Downloads the contents of the stored file specified by id into the Observable.

    id

    the ObjectId of the file to be written to the destination stream

    returns

    a Observable with a single element, representing the amount of data written

    Since

    2.8

  21. def drop(clientSession: ClientSession): Observable[Completed]

    Drops the data associated with this bucket from the database.

    Drops the data associated with this bucket from the database.

    clientSession

    the client session with which to associate this operation

    returns

    a Observable with a single element indicating when the operation has completed

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  22. def drop(): Observable[Completed]

    Drops the data associated with this bucket from the database.

    Drops the data associated with this bucket from the database.

    returns

    a Observable with a single element indicating when the operation has completed

  23. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  25. def find(clientSession: ClientSession, filter: Bson): GridFSFindObservable

    Finds all documents in the collection that match the filter.

    Finds all documents in the collection that match the filter. Below is an example of filtering against the filename and some nested metadata that can also be stored along with the file data: Filters.and(Filters.eq("filename", "mongodb.png"), Filters.eq("metadata.contentType", "image/png"));

    clientSession

    the client session with which to associate this operation

    filter

    the query filter

    returns

    the GridFS find iterable interface

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

    See also

    com.mongodb.client.model.Filters

  26. def find(clientSession: ClientSession): GridFSFindObservable

    Finds all documents in the files collection.

    Finds all documents in the files collection.

    clientSession

    the client session with which to associate this operation

    returns

    the GridFS find iterable interface

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

    See also

    Find

  27. def find(filter: Bson): GridFSFindObservable

    Finds all documents in the collection that match the filter.

    Finds all documents in the collection that match the filter. Below is an example of filtering against the filename and some nested metadata that can also be stored along with the file data: Filters.and(Filters.eq("filename", "mongodb.png"), Filters.eq("metadata.contentType", "image/png"));

    filter

    the query filter

    returns

    the GridFS find iterable interface

    See also

    com.mongodb.client.model.Filters

  28. def find(): GridFSFindObservable

    Finds all documents in the files collection.

    Finds all documents in the files collection.

    returns

    the GridFS find iterable interface

    See also

    Find

  29. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  34. def productElementNames: Iterator[String]
    Definition Classes
    Product
  35. lazy val readConcern: ReadConcern

    Get the read concern for the GridFSBucket.

    Get the read concern for the GridFSBucket.

    returns

    the ReadConcern

    Note

    Requires MongoDB 3.2 or greater

    See also

    Read Concern

  36. lazy val readPreference: ReadPreference

    Get the read preference for the GridFSBucket.

    Get the read preference for the GridFSBucket.

    returns

    the ReadPreference

  37. def rename(clientSession: ClientSession, id: BsonValue, newFilename: String): Observable[Completed]

    Renames the stored file with the specified id.

    Renames the stored file with the specified id.

    clientSession

    the client session with which to associate this operation

    id

    the id of the file in the files collection to rename

    newFilename

    the new filename for the file

    returns

    a Observable with a single element indicating when the operation has completed

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  38. def rename(clientSession: ClientSession, id: ObjectId, newFilename: String): Observable[Completed]

    Renames the stored file with the specified id.

    Renames the stored file with the specified id.

    clientSession

    the client session with which to associate this operation

    id

    the id of the file in the files collection to rename

    newFilename

    the new filename for the file

    returns

    a Observable with a single element indicating when the operation has completed

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  39. def rename(id: BsonValue, newFilename: String): Observable[Completed]

    Renames the stored file with the specified id.

    Renames the stored file with the specified id.

    id

    the id of the file in the files collection to rename

    newFilename

    the new filename for the file

    returns

    a Observable with a single element indicating when the operation has completed

  40. def rename(id: ObjectId, newFilename: String): Observable[Completed]

    Renames the stored file with the specified id.

    Renames the stored file with the specified id.

    id

    the id of the file in the files collection to rename

    newFilename

    the new filename for the file

    returns

    a Observable with a single element indicating when the operation has completed

  41. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  42. def uploadFromObservable(clientSession: ClientSession, id: BsonValue, filename: String, source: Observable[ByteBuffer], options: GridFSUploadOptions): GridFSUploadObservable[Completed]

    Uploads the contents of the given Observable to a GridFS bucket.

    Uploads the contents of the given Observable to a GridFS bucket. Reads the contents of the user file from the source and uploads it as chunks in the chunks collection. After all the chunks have been uploaded, it creates a files collection document for filename in the files collection.

    clientSession

    the client session with which to associate this operation

    id

    the custom id value of the file

    filename

    the filename for the stream

    source

    the Observable providing the file data

    options

    the GridFSUploadOptions

    returns

    a Observable with a single element, representing when the Completedful upload of the source.

    Since

    2.8

    Note

    Requires MongoDB 3.6 or greater

  43. def uploadFromObservable(clientSession: ClientSession, id: BsonValue, filename: String, source: Observable[ByteBuffer]): GridFSUploadObservable[Completed]

    Uploads the contents of the given Observable to a GridFS bucket.

    Uploads the contents of the given Observable to a GridFS bucket. Reads the contents of the user file from the source and uploads it as chunks in the chunks collection. After all the chunks have been uploaded, it creates a files collection document for filename in the files collection.

    clientSession

    the client session with which to associate this operation

    id

    the custom id value of the file

    filename

    the filename for the stream

    source

    the Observable providing the file data

    returns

    a Observable with a single element, representing when the Completedful upload of the source.

    Since

    2.8

    Note

    Requires MongoDB 3.6 or greater

  44. def uploadFromObservable(clientSession: ClientSession, filename: String, source: Observable[ByteBuffer], options: GridFSUploadOptions): GridFSUploadObservable[ObjectId]

    Uploads the contents of the given Observable to a GridFS bucket.

    Uploads the contents of the given Observable to a GridFS bucket. Reads the contents of the user file from the source and uploads it as chunks in the chunks collection. After all the chunks have been uploaded, it creates a files collection document for filename in the files collection.

    clientSession

    the client session with which to associate this operation

    filename

    the filename for the stream

    source

    the Observable providing the file data

    options

    the GridFSUploadOptions

    returns

    a Observable with a single element, the ObjectId of the uploaded file.

    Since

    2.8

    Note

    Requires MongoDB 3.6 or greater

  45. def uploadFromObservable(clientSession: ClientSession, filename: String, source: Observable[ByteBuffer]): GridFSUploadObservable[ObjectId]

    Uploads the contents of the given Observable to a GridFS bucket.

    Uploads the contents of the given Observable to a GridFS bucket. Reads the contents of the user file from the source and uploads it as chunks in the chunks collection. After all the chunks have been uploaded, it creates a files collection document for filename in the files collection.

    clientSession

    the client session with which to associate this operation

    filename

    the filename for the stream

    source

    the Observable providing the file data

    returns

    a Observable with a single element, the ObjectId of the uploaded file.

    Since

    2.8

    Note

    Requires MongoDB 3.6 or greater

  46. def uploadFromObservable(id: BsonValue, filename: String, source: Observable[ByteBuffer], options: GridFSUploadOptions): GridFSUploadObservable[Completed]

    Uploads the contents of the given Observable to a GridFS bucket.

    Uploads the contents of the given Observable to a GridFS bucket. Reads the contents of the user file from the source and uploads it as chunks in the chunks collection. After all the chunks have been uploaded, it creates a files collection document for filename in the files collection.

    id

    the custom id value of the file

    filename

    the filename for the stream

    source

    the Observable providing the file data

    options

    the GridFSUploadOptions

    returns

    a Observable with a single element, representing when the Completedful upload of the source.

    Since

    2.8

  47. def uploadFromObservable(id: BsonValue, filename: String, source: Observable[ByteBuffer]): GridFSUploadObservable[Completed]

    Uploads the contents of the given Observable to a GridFS bucket.

    Uploads the contents of the given Observable to a GridFS bucket. Reads the contents of the user file from the source and uploads it as chunks in the chunks collection. After all the chunks have been uploaded, it creates a files collection document for filename in the files collection.

    id

    the custom id value of the file

    filename

    the filename for the stream

    source

    the Observable providing the file data

    returns

    a Observable with a single element, representing when the Completedful upload of the source.

    Since

    2.8

  48. def uploadFromObservable(filename: String, source: Observable[ByteBuffer], options: GridFSUploadOptions): GridFSUploadObservable[ObjectId]

    Uploads the contents of the given Observable to a GridFS bucket.

    Uploads the contents of the given Observable to a GridFS bucket. Reads the contents of the user file from the source and uploads it as chunks in the chunks collection. After all the chunks have been uploaded, it creates a files collection document for filename in the files collection.

    filename

    the filename for the stream

    source

    the Observable providing the file data

    options

    the GridFSUploadOptions

    returns

    a Observable with a single element, the ObjectId of the uploaded file.

    Since

    2.8

  49. def uploadFromObservable(filename: String, source: Observable[ByteBuffer]): GridFSUploadObservable[ObjectId]

    Uploads the contents of the given Observable to a GridFS bucket.

    Uploads the contents of the given Observable to a GridFS bucket. Reads the contents of the user file from the source and uploads it as chunks in the chunks collection. After all the chunks have been uploaded, it creates a files collection document for filename in the files collection.

    filename

    the filename for the stream

    source

    the Observable providing the file data

    returns

    a Observable with a single element, the ObjectId of the uploaded file.

    Since

    2.8

  50. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  51. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  52. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  53. def withChunkSizeBytes(chunkSizeBytes: Int): GridFSBucket

    Create a new GridFSBucket instance with a new chunk size in bytes.

    Create a new GridFSBucket instance with a new chunk size in bytes.

    chunkSizeBytes

    the new chunk size in bytes.

    returns

    a new GridFSBucket instance with the different chunk size in bytes

  54. def withDisableMD5(disableMD5: Boolean): GridFSBucket

    Create a new GridFSBucket instance with the set disable MD5 value.

    Create a new GridFSBucket instance with the set disable MD5 value.

    disableMD5

    true if computing MD5 checksums when uploading files should be disabled.

    returns

    a new GridFSBucket instance with the new disable MD5 value.

    Since

    2.4

  55. def withReadConcern(readConcern: ReadConcern): GridFSBucket

    Create a new MongoDatabase instance with a different read concern.

    Create a new MongoDatabase instance with a different read concern.

    readConcern

    the new ReadConcern for the database

    returns

    a new GridFSBucket instance with the different ReadConcern

    Note

    Requires MongoDB 3.2 or greater

    See also

    Read Concern

  56. def withReadPreference(readPreference: ReadPreference): GridFSBucket

    Create a new GridFSBucket instance with a different read preference.

    Create a new GridFSBucket instance with a different read preference.

    readPreference

    the new ReadPreference for the database

    returns

    a new GridFSBucket instance with the different readPreference

  57. def withWriteConcern(writeConcern: WriteConcern): GridFSBucket

    Create a new GridFSBucket instance with a different write concern.

    Create a new GridFSBucket instance with a different write concern.

    writeConcern

    the new WriteConcern for the database

    returns

    a new GridFSBucket instance with the different writeConcern

  58. lazy val writeConcern: WriteConcern

    Get the write concern for the GridFSBucket.

    Get the write concern for the GridFSBucket.

    returns

    the WriteConcern

Deprecated Value Members

  1. def downloadToStream(clientSession: ClientSession, filename: String, destination: AsyncOutputStream, options: GridFSDownloadOptions): Observable[Long]

    Downloads the contents of the stored file specified by filename and by the revision in options and writes the contents to the destination Stream.

    Downloads the contents of the stored file specified by filename and by the revision in options and writes the contents to the destination Stream.

    clientSession

    the client session with which to associate this operation

    filename

    the name of the file to be downloaded

    destination

    the destination stream

    options

    the download options

    returns

    a Observable with a single element indicating the file has been downloaded

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use downloadToObservable instead

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  2. def downloadToStream(clientSession: ClientSession, filename: String, destination: AsyncOutputStream): Observable[Long]

    Downloads the contents of the latest version of the stored file specified by filename and writes the contents to the destination Stream.

    Downloads the contents of the latest version of the stored file specified by filename and writes the contents to the destination Stream.

    clientSession

    the client session with which to associate this operation

    filename

    the name of the file to be downloaded

    destination

    the destination stream

    returns

    a Observable with a single element indicating the file has been downloaded

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use downloadToObservable instead

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  3. def downloadToStream(clientSession: ClientSession, id: BsonValue, destination: AsyncOutputStream): Observable[Long]

    Downloads the contents of the stored file specified by id and writes the contents to the destination AsyncOutputStream.

    Downloads the contents of the stored file specified by id and writes the contents to the destination AsyncOutputStream.

    clientSession

    the client session with which to associate this operation

    id

    the custom id of the file, to be written to the destination stream

    destination

    the destination stream

    returns

    a Observable with a single element indicating the file has been downloaded

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use downloadToObservable instead

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  4. def downloadToStream(clientSession: ClientSession, id: ObjectId, destination: AsyncOutputStream): Observable[Long]

    Downloads the contents of the stored file specified by id and writes the contents to the destination AsyncOutputStream.

    Downloads the contents of the stored file specified by id and writes the contents to the destination AsyncOutputStream.

    clientSession

    the client session with which to associate this operation

    id

    the ObjectId of the file to be written to the destination stream

    destination

    the destination stream

    returns

    a Observable with a single element indicating the file has been downloaded

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use downloadToObservable instead

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  5. def downloadToStream(filename: String, destination: AsyncOutputStream, options: GridFSDownloadOptions): Observable[Long]

    Downloads the contents of the stored file specified by filename and by the revision in options and writes the contents to the destination Stream.

    Downloads the contents of the stored file specified by filename and by the revision in options and writes the contents to the destination Stream.

    filename

    the name of the file to be downloaded

    destination

    the destination stream

    options

    the download options

    returns

    a Observable with a single element indicating the file has been downloaded

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use downloadToObservable instead

  6. def downloadToStream(filename: String, destination: AsyncOutputStream): Observable[Long]

    Downloads the contents of the latest version of the stored file specified by filename and writes the contents to the destination Stream.

    Downloads the contents of the latest version of the stored file specified by filename and writes the contents to the destination Stream.

    filename

    the name of the file to be downloaded

    destination

    the destination stream

    returns

    a Observable with a single element indicating the file has been downloaded

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use downloadToObservable instead

  7. def downloadToStream(id: BsonValue, destination: AsyncOutputStream): Observable[Long]

    Downloads the contents of the stored file specified by id and writes the contents to the destination AsyncOutputStream.

    Downloads the contents of the stored file specified by id and writes the contents to the destination AsyncOutputStream.

    id

    the custom id of the file, to be written to the destination stream

    destination

    the destination stream

    returns

    a Observable with a single element indicating the file has been downloaded

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use downloadToObservable instead

  8. def downloadToStream(id: ObjectId, destination: AsyncOutputStream): Observable[Long]

    Downloads the contents of the stored file specified by id and writes the contents to the destination AsyncOutputStream.

    Downloads the contents of the stored file specified by id and writes the contents to the destination AsyncOutputStream.

    id

    the ObjectId of the file to be written to the destination stream

    destination

    the destination stream

    returns

    a Observable with a single element indicating the file has been downloaded

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use downloadToObservable instead

  9. def openDownloadStream(clientSession: ClientSession, filename: String, options: GridFSDownloadOptions): GridFSDownloadStream

    Opens a Stream from which the application can read the contents of the stored file specified by filename and the revision in options.

    Opens a Stream from which the application can read the contents of the stored file specified by filename and the revision in options.

    clientSession

    the client session with which to associate this operation

    filename

    the name of the file to be downloaded

    options

    the download options

    returns

    the stream

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use downloadToObservable instead

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  10. def openDownloadStream(clientSession: ClientSession, filename: String): GridFSDownloadStream

    Opens a Stream from which the application can read the contents of the latest version of the stored file specified by the filename.

    Opens a Stream from which the application can read the contents of the latest version of the stored file specified by the filename.

    clientSession

    the client session with which to associate this operation

    filename

    the name of the file to be downloaded

    returns

    the stream

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use downloadToObservable instead

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  11. def openDownloadStream(clientSession: ClientSession, id: BsonValue): GridFSDownloadStream

    Opens a AsyncInputStream from which the application can read the contents of the stored file specified by id.

    Opens a AsyncInputStream from which the application can read the contents of the stored file specified by id.

    clientSession

    the client session with which to associate this operation

    id

    the custom id value of the file, to be put into a stream.

    returns

    the stream

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use downloadToObservable instead

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  12. def openDownloadStream(clientSession: ClientSession, id: ObjectId): GridFSDownloadStream

    Opens a AsyncInputStream from which the application can read the contents of the stored file specified by id.

    Opens a AsyncInputStream from which the application can read the contents of the stored file specified by id.

    clientSession

    the client session with which to associate this operation

    id

    the ObjectId of the file to be put into a stream.

    returns

    the stream

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use downloadToObservable instead

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  13. def openDownloadStream(filename: String, options: GridFSDownloadOptions): GridFSDownloadStream

    Opens a Stream from which the application can read the contents of the stored file specified by filename and the revision in options.

    Opens a Stream from which the application can read the contents of the stored file specified by filename and the revision in options.

    filename

    the name of the file to be downloaded

    options

    the download options

    returns

    the stream

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use downloadToObservable instead

  14. def openDownloadStream(filename: String): GridFSDownloadStream

    Opens a Stream from which the application can read the contents of the latest version of the stored file specified by the filename.

    Opens a Stream from which the application can read the contents of the latest version of the stored file specified by the filename.

    filename

    the name of the file to be downloaded

    returns

    the stream

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use downloadToObservable instead

  15. def openDownloadStream(id: BsonValue): GridFSDownloadStream

    Opens a AsyncInputStream from which the application can read the contents of the stored file specified by id.

    Opens a AsyncInputStream from which the application can read the contents of the stored file specified by id.

    id

    the custom id value of the file, to be put into a stream.

    returns

    the stream

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use downloadToObservable instead

  16. def openDownloadStream(id: ObjectId): GridFSDownloadStream

    Opens a AsyncInputStream from which the application can read the contents of the stored file specified by id.

    Opens a AsyncInputStream from which the application can read the contents of the stored file specified by id.

    id

    the ObjectId of the file to be put into a stream.

    returns

    the stream

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use downloadToObservable instead

  17. def openUploadStream(clientSession: ClientSession, id: BsonValue, filename: String, options: GridFSUploadOptions): GridFSUploadStream

    Opens a AsyncOutputStream that the application can write the contents of the file to.

    Opens a AsyncOutputStream that the application can write the contents of the file to. As the application writes the contents to the returned Stream, the contents are uploaded as chunks in the chunks collection. When the application signals it is done writing the contents of the file by calling close on the returned Stream, a files collection document is created in the files collection.

    clientSession

    the client session with which to associate this operation

    id

    the custom id value of the file

    filename

    the filename for the stream

    options

    the GridFSUploadOptions

    returns

    the GridFSUploadStream that provides the ObjectId for the file to be uploaded and the Stream to which the application will write the contents.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use uploadFromObservable instead

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  18. def openUploadStream(clientSession: ClientSession, id: BsonValue, filename: String): GridFSUploadStream

    Opens a AsyncOutputStream that the application can write the contents of the file to.

    Opens a AsyncOutputStream that the application can write the contents of the file to. As the application writes the contents to the returned Stream, the contents are uploaded as chunks in the chunks collection. When the application signals it is done writing the contents of the file by calling close on the returned Stream, a files collection document is created in the files collection.

    clientSession

    the client session with which to associate this operation

    id

    the custom id value of the file

    filename

    the filename for the stream

    returns

    the GridFSUploadStream that provides the ObjectId for the file to be uploaded and the Stream to which the application will write the contents.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use uploadFromObservable instead

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  19. def openUploadStream(clientSession: ClientSession, filename: String, options: GridFSUploadOptions): GridFSUploadStream

    Opens a AsyncOutputStream that the application can write the contents of the file to.

    Opens a AsyncOutputStream that the application can write the contents of the file to. As the application writes the contents to the returned Stream, the contents are uploaded as chunks in the chunks collection. When the application signals it is done writing the contents of the file by calling close on the returned Stream, a files collection document is created in the files collection.

    clientSession

    the client session with which to associate this operation

    filename

    the filename for the stream

    options

    the GridFSUploadOptions

    returns

    the GridFSUploadStream that provides the ObjectId for the file to be uploaded and the Stream to which the application will write the contents.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use uploadFromObservable instead

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  20. def openUploadStream(clientSession: ClientSession, filename: String): GridFSUploadStream

    Opens a AsyncOutputStream that the application can write the contents of the file to.

    Opens a AsyncOutputStream that the application can write the contents of the file to. As the application writes the contents to the returned Stream, the contents are uploaded as chunks in the chunks collection. When the application signals it is done writing the contents of the file by calling close on the returned Stream, a files collection document is created in the files collection.

    clientSession

    the client session with which to associate this operation

    filename

    the filename for the stream

    returns

    the GridFSUploadStream that provides the ObjectId for the file to be uploaded and the Stream to which the application will write the contents.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use uploadFromObservable instead

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  21. def openUploadStream(id: BsonValue, filename: String, options: GridFSUploadOptions): GridFSUploadStream

    Opens a AsyncOutputStream that the application can write the contents of the file to.

    Opens a AsyncOutputStream that the application can write the contents of the file to. As the application writes the contents to the returned Stream, the contents are uploaded as chunks in the chunks collection. When the application signals it is done writing the contents of the file by calling close on the returned Stream, a files collection document is created in the files collection.

    id

    the custom id value of the file

    filename

    the filename for the stream

    options

    the GridFSUploadOptions

    returns

    the GridFSUploadStream that provides the ObjectId for the file to be uploaded and the Stream to which the application will write the contents.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use uploadFromObservable instead

  22. def openUploadStream(id: BsonValue, filename: String): GridFSUploadStream

    Opens a AsyncOutputStream that the application can write the contents of the file to.

    Opens a AsyncOutputStream that the application can write the contents of the file to. As the application writes the contents to the returned Stream, the contents are uploaded as chunks in the chunks collection. When the application signals it is done writing the contents of the file by calling close on the returned Stream, a files collection document is created in the files collection.

    id

    the custom id value of the file

    filename

    the filename for the stream

    returns

    the GridFSUploadStream that provides the ObjectId for the file to be uploaded and the Stream to which the application will write the contents.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use uploadFromObservable instead

  23. def openUploadStream(filename: String, options: GridFSUploadOptions): GridFSUploadStream

    Opens a AsyncOutputStream that the application can write the contents of the file to.

    Opens a AsyncOutputStream that the application can write the contents of the file to. As the application writes the contents to the returned Stream, the contents are uploaded as chunks in the chunks collection. When the application signals it is done writing the contents of the file by calling close on the returned Stream, a files collection document is created in the files collection.

    filename

    the filename for the stream

    options

    the GridFSUploadOptions

    returns

    the GridFSUploadStream that provides the ObjectId for the file to be uploaded and the Stream to which the application will write the contents.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use uploadFromObservable instead

  24. def openUploadStream(filename: String): GridFSUploadStream

    Opens a AsyncOutputStream that the application can write the contents of the file to.

    Opens a AsyncOutputStream that the application can write the contents of the file to. As the application writes the contents to the returned Stream, the contents are uploaded as chunks in the chunks collection. When the application signals it is done writing the contents of the file by calling close on the returned Stream, a files collection document is created in the files collection.

    filename

    the filename for the stream

    returns

    the GridFSUploadStream that provides the ObjectId for the file to be uploaded and the Stream to which the application will write the contents.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use uploadFromObservable instead

  25. def uploadFromStream(clientSession: ClientSession, id: BsonValue, filename: String, source: AsyncInputStream, options: GridFSUploadOptions): Observable[Completed]

    Uploads the contents of the given AsyncInputStream to a GridFS bucket.

    Uploads the contents of the given AsyncInputStream to a GridFS bucket. Reads the contents of the user file from the source and uploads it as chunks in the chunks collection. After all the chunks have been uploaded, it creates a files collection document for filename in the files collection.

    clientSession

    the client session with which to associate this operation

    id

    the custom id value of the file

    filename

    the filename for the stream

    source

    the Stream providing the file data

    options

    the GridFSUploadOptions

    returns

    a Observable with a single element indicating when the operation has completed

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use uploadFromObservable instead

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  26. def uploadFromStream(clientSession: ClientSession, id: BsonValue, filename: String, source: AsyncInputStream): Observable[Completed]

    Uploads the contents of the given AsyncInputStream to a GridFS bucket.

    Uploads the contents of the given AsyncInputStream to a GridFS bucket. Reads the contents of the user file from the source and uploads it as chunks in the chunks collection. After all the chunks have been uploaded, it creates a files collection document for filename in the files collection.

    clientSession

    the client session with which to associate this operation

    id

    the custom id value of the file

    filename

    the filename for the stream

    source

    the Stream providing the file data

    returns

    a Observable with a single element indicating when the operation has completed

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use uploadFromObservable instead

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  27. def uploadFromStream(clientSession: ClientSession, filename: String, source: AsyncInputStream, options: GridFSUploadOptions): Observable[ObjectId]

    Uploads the contents of the given AsyncInputStream to a GridFS bucket.

    Uploads the contents of the given AsyncInputStream to a GridFS bucket. Reads the contents of the user file from the source and uploads it as chunks in the chunks collection. After all the chunks have been uploaded, it creates a files collection document for filename in the files collection.

    clientSession

    the client session with which to associate this operation

    filename

    the filename for the stream

    source

    the Stream providing the file data

    options

    the GridFSUploadOptions

    returns

    a Observable returning a single element containing the ObjectId of the uploaded file.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use uploadFromObservable instead

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  28. def uploadFromStream(clientSession: ClientSession, filename: String, source: AsyncInputStream): Observable[ObjectId]

    Uploads the contents of the given AsyncInputStream to a GridFS bucket.

    Uploads the contents of the given AsyncInputStream to a GridFS bucket. Reads the contents of the user file from the source and uploads it as chunks in the chunks collection. After all the chunks have been uploaded, it creates a files collection document for filename in the files collection.

    clientSession

    the client session with which to associate this operation

    filename

    the filename for the stream

    source

    the Stream providing the file data

    returns

    a Observable returning a single element containing the ObjectId of the uploaded file.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use uploadFromObservable instead

    Since

    2.2

    Note

    Requires MongoDB 3.6 or greater

  29. def uploadFromStream(id: BsonValue, filename: String, source: AsyncInputStream, options: GridFSUploadOptions): Observable[Completed]

    Uploads the contents of the given AsyncInputStream to a GridFS bucket.

    Uploads the contents of the given AsyncInputStream to a GridFS bucket. Reads the contents of the user file from the source and uploads it as chunks in the chunks collection. After all the chunks have been uploaded, it creates a files collection document for filename in the files collection.

    id

    the custom id value of the file

    filename

    the filename for the stream

    source

    the Stream providing the file data

    options

    the GridFSUploadOptions

    returns

    a Observable with a single element indicating when the operation has completed

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use uploadFromObservable instead

  30. def uploadFromStream(id: BsonValue, filename: String, source: AsyncInputStream): Observable[Completed]

    Uploads the contents of the given AsyncInputStream to a GridFS bucket.

    Uploads the contents of the given AsyncInputStream to a GridFS bucket. Reads the contents of the user file from the source and uploads it as chunks in the chunks collection. After all the chunks have been uploaded, it creates a files collection document for filename in the files collection.

    id

    the custom id value of the file

    filename

    the filename for the stream

    source

    the Stream providing the file data

    returns

    a Observable with a single element indicating when the operation has completed

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use uploadFromObservable instead

  31. def uploadFromStream(filename: String, source: AsyncInputStream, options: GridFSUploadOptions): Observable[ObjectId]

    Uploads the contents of the given AsyncInputStream to a GridFS bucket.

    Uploads the contents of the given AsyncInputStream to a GridFS bucket. Reads the contents of the user file from the source and uploads it as chunks in the chunks collection. After all the chunks have been uploaded, it creates a files collection document for filename in the files collection.

    filename

    the filename for the stream

    source

    the Stream providing the file data

    options

    the GridFSUploadOptions

    returns

    a Observable returning a single element containing the ObjectId of the uploaded file.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use uploadFromObservable instead

  32. def uploadFromStream(filename: String, source: AsyncInputStream): Observable[ObjectId]

    Uploads the contents of the given AsyncInputStream to a GridFS bucket.

    Uploads the contents of the given AsyncInputStream to a GridFS bucket. Reads the contents of the user file from the source and uploads it as chunks in the chunks collection. After all the chunks have been uploaded, it creates a files collection document for filename in the files collection.

    filename

    the filename for the stream

    source

    the Stream providing the file data

    returns

    a Observable returning a single element containing the ObjectId of the uploaded file.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use uploadFromObservable instead

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped