InboxFileStreamReader
Manages handle for file reading from Inbox.
Static Methods
openFile
Opens Inbox file.
Params
api
InboxApi
reference to Inbox API
fileId
String
ID of the file to open
Returns
InboxFileStreamReader
·
Instance ready to read from the Inbox file
openFile
Opens Inbox file and writes it into OutputStream with optimized chunk size InboxFileStream#OPTIMAL_SEND_SIZE.
Params
api
InboxApi
reference to Inbox API
fileId
String
ID of the file to open
outputStream
OutputStream
stream to write downloaded data
Returns
String
·
ID of the read file
openFile
Opens Inbox file and writes it into OutputStream with optimized chunk size InboxFileStream#OPTIMAL_SEND_SIZE.
Params
api
InboxApi
reference to Inbox API
fileId
String
ID of the file to open
outputStream
OutputStream
stream to write downloaded data
streamController
Controller
controls the process of reading file
Returns
String
·
ID of the read file
Methods
read
Reads file data and moves the cursor. If read data size is less than length, then EOF.
Params
size
Long
size of data to read (the recommended size is InboxFileStream#OPTIMAL_SEND_SIZE)
Returns
byte[]
·
Read data
seek
Moves read cursor.
Params
position
long
new cursor position
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.