StoreFileStream
Base class for Store file streams. Implements progress listeners.
Constructors
StoreFileStream
Creates instance of StoreFileStream
.
Params
handle
Long
handle to Store file
storeApi
StoreApi
StoreApi instance that calls read/write methods on files
Fields
OPTIMAL_SEND_SIZE
long
Constant value with optimal size of reading/sending data.
handle
Long
Reference to file handle.
storeApi
StoreApi
Reference to StoreApi.
Methods
callChunkProcessed
Increases the size of current sent/read data by chunkSize and calls ProgressListener#onChunkProcessed(Long).
Params
chunkSize
Long
size of processed chunk
close
Closes file handle.
Returns
String
·
ID of the closed file
isClosed
Returns information whether the instance is closed.
Returns
Boolean
·
true
if file handle is closed
setProgressListener
Sets listening for single chunk sent/read.
Params
progressListener
ProgressListener
callback triggered when chunk is sent/read
We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.