Package com.mongodb.client.gridfs
Class GridFSDownloadStream
- java.lang.Object
-
- java.io.InputStream
-
- com.mongodb.client.gridfs.GridFSDownloadStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
@NotThreadSafe @Deprecated(since="2021-05-27") public abstract class GridFSDownloadStream extends java.io.InputStream
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.A GridFS InputStream for downloading data from GridFSProvides the
GridFSFile
for the file to being downloaded as well as theread
methods of aInputStream
This implementation of a
InputStream
will not throwIOException
s. However, it will throw aMongoException
if there is an error reading from MongoDB.- Since:
- 3.1
-
-
Constructor Summary
Constructors Constructor Description GridFSDownloadStream()
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description abstract int
available()
Deprecated.abstract GridFSDownloadStream
batchSize(int batchSize)
Deprecated.Sets the number of chunks to return per batch.abstract void
close()
Deprecated.abstract GridFSFile
getGridFSFile()
Deprecated.Gets the correspondingGridFSFile
for the file being downloadedabstract void
mark()
Deprecated.Marks the current position in this input stream.abstract int
read()
Deprecated.abstract int
read(byte[] b)
Deprecated.abstract int
read(byte[] b, int off, int len)
Deprecated.abstract void
reset()
Deprecated.abstract long
skip(long n)
Deprecated.
-
-
-
Method Detail
-
getGridFSFile
public abstract GridFSFile getGridFSFile()
Deprecated.Gets the correspondingGridFSFile
for the file being downloaded- Returns:
- the corresponding GridFSFile for the file being downloaded
-
batchSize
public abstract GridFSDownloadStream batchSize(int batchSize)
Deprecated.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.
- Parameters:
batchSize
- the batch size- Returns:
- this
-
read
public abstract int read()
Deprecated.- Specified by:
read
in classjava.io.InputStream
-
read
public abstract int read(byte[] b)
Deprecated.- Overrides:
read
in classjava.io.InputStream
-
read
public abstract int read(byte[] b, int off, int len)
Deprecated.- Overrides:
read
in classjava.io.InputStream
-
skip
public abstract long skip(long n)
Deprecated.- Overrides:
skip
in classjava.io.InputStream
-
available
public abstract int available()
Deprecated.- Overrides:
available
in classjava.io.InputStream
-
mark
public abstract void mark()
Deprecated.Marks the current position in this input stream.A subsequent call to the
reset
method repositions this stream at the last marked position so that subsequent reads re-read the same bytes.
-
reset
public abstract void reset()
Deprecated.- Overrides:
reset
in classjava.io.InputStream
-
close
public abstract void close()
Deprecated.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
-
-