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
GridFSFilefor the file to being downloaded as well as thereadmethods of aInputStreamThis implementation of a
InputStreamwill not throwIOExceptions. However, it will throw aMongoExceptionif 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 intavailable()Deprecated.abstract GridFSDownloadStreambatchSize(int batchSize)Deprecated.Sets the number of chunks to return per batch.abstract voidclose()Deprecated.abstract GridFSFilegetGridFSFile()Deprecated.Gets the correspondingGridFSFilefor the file being downloadedabstract voidmark()Deprecated.Marks the current position in this input stream.abstract intread()Deprecated.abstract intread(byte[] b)Deprecated.abstract intread(byte[] b, int off, int len)Deprecated.abstract voidreset()Deprecated.abstract longskip(long n)Deprecated.
-
-
-
Method Detail
-
getGridFSFile
public abstract GridFSFile getGridFSFile()
Deprecated.Gets the correspondingGridFSFilefor 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:
readin classjava.io.InputStream
-
read
public abstract int read(byte[] b)
Deprecated.- Overrides:
readin classjava.io.InputStream
-
read
public abstract int read(byte[] b, int off, int len)Deprecated.- Overrides:
readin classjava.io.InputStream
-
skip
public abstract long skip(long n)
Deprecated.- Overrides:
skipin classjava.io.InputStream
-
available
public abstract int available()
Deprecated.- Overrides:
availablein classjava.io.InputStream
-
mark
public abstract void mark()
Deprecated.Marks the current position in this input stream.A subsequent call to the
resetmethod repositions this stream at the last marked position so that subsequent reads re-read the same bytes.
-
reset
public abstract void reset()
Deprecated.- Overrides:
resetin classjava.io.InputStream
-
close
public abstract void close()
Deprecated.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream
-
-