Packages

c

org.mongodb.scala.gridfs

GridFSDownloadStream

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

A GridFS InputStream for downloading data from GridFS

Provides the GridFSFile for the file to being downloaded as well as the read methods of a AsyncInputStream

Since

1.2

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GridFSDownloadStream
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AsyncInputStream
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

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

Value Members

  1. def batchSize(batchSize: Int): GridFSDownloadStream

    Sets the number of chunks to return per batch.

    Sets the number of chunks to return per batch.

    Can be used to control the memory consumption of this InputStream. The smaller the batchSize the lower the memory consumption and higher latency.

    batchSize

    the batch size

    returns

    this

    See also

    Batch Size

  2. def close(): Observable[Completed]

    Closes the input stream

    Closes the input stream

    returns

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

    Definition Classes
    GridFSDownloadStreamAsyncInputStream
  3. def gridFSFile(): Observable[GridFSFile]

    Gets the corresponding GridFSFile for the file being downloaded

    Gets the corresponding GridFSFile for the file being downloaded

    returns

    a Observable with a single element containing the corresponding GridFSFile for the file being downloaded

  4. def read(dst: ByteBuffer): Observable[Int]

    Reads a sequence of bytes from this stream into the given buffer.

    Reads a sequence of bytes from this stream into the given buffer.

    dst

    the destination buffer

    returns

    an Observable with a single element indicating total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.

    Definition Classes
    GridFSDownloadStreamAsyncInputStream