openFile
fun StoreFileStreamReader.Companion.openFile(api: StoreApi, fileId: String, outputStream: OutputStream, streamController: StoreFileStream.Controller? = null): String
Opens Store file and writes it into OutputStream.
Return
ID of the read file
Parameters
api
reference to Store API
fileId
ID of the file to open
outputStream
stream to write downloaded data with optimized chunk size StoreFileStream.OPTIMAL_SEND_SIZE
streamController
controls the process of reading file
Throws
if there is an error while writing stream
when storeApi is not initialized or there's no connection
if there is an error while reading Store file
if there is an unknown error while reading Store file