import { InboxApi } from '../api/inbox/InboxApi'; import { StoreApi } from '../api/store/StoreApi'; /** * Represents a stream reader for reading a file in chunks. */ export declare class StreamReader { private _data; private _handle; private _offset; private _size; private _api; /** * Creates an instance of StreamReader. * * @param {number} handle - The file handle. * @param {StoreApi} api {@link StoreApi `StoreApi`} instance */ constructor(handle: number, api: StoreApi | InboxApi); /** * Gets the progress of reading the file as a percentage. * * @returns {number} The progress percentage. */ get progress(): number; /** * Gets the data read so far. * * @returns {Uint8Array} The data read so far. */ get data(): Uint8Array; /** * Reads the next chunk of the file. * * @returns {Promise} A promise that resolves to true if there are more chunks to read, or false if the end of the file is reached. */ readNextChunk(): Promise; /** * Aborts the reading process and closes the file handle. * * @returns {Promise} A promise that resolves when the file handle is closed. */ abort(): Promise; /** * Closes the file handle. * * @returns {Promise} A promise that resolves when the file handle is closed and returns file ID. */ close(): Promise; }