AsyncInputStream
public interface GridFSDownloadStream extends AsyncInputStream
Provides the GridFSFile
for the file to being downloaded as well as the read
methods of a AsyncInputStream
Modifier and Type | Method | Description |
---|---|---|
GridFSDownloadStream |
batchSize(int batchSize) |
Sets the number of chunks to return per batch.
|
void |
getGridFSFile(SingleResultCallback<GridFSFile> callback) |
Gets the corresponding
GridFSFile for the file being downloaded |
close, read
void getGridFSFile(SingleResultCallback<GridFSFile> callback)
GridFSFile
for the file being downloadedcallback
- that returns the corresponding GridFSFile for the file being downloadedGridFSDownloadStream batchSize(int batchSize)
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