import { RemoteDataFile } from './RemoteDataFile'; import { RemoteFileSourceBrowser } from '../types'; /** * Represents a remote data file on the browser platform. */ export declare class RemoteDataFileBrowser extends RemoteDataFile { /** * Utility function to wrap a file as a [[DataFile]] for this platform. * NOTE: This function calls `startDownloading` on the file. * @param source - The file to wrap */ static fromSource(source: RemoteFileSourceBrowser): Promise; /** * Variable to hold the byte length of the loaded file. */ private _byteLength; /** * The total length, in bytes, of the file this instance represents. */ get byteLength(): Promise; /** * Variable to hold the bytes loaded so far from the remote file. */ private _bytesLoaded; /** * Bytes loaded for this file, useful when parsing streaming files. */ get bytesLoaded(): number; /** * Variable that holds a promise that resolves when the file finishes loading */ private _onLoadingComplete; /** * Promise that resolves when this file has finished downloading from the remote server. */ get onLoadingComplete(): Promise; /** * Variable that holds a boolean describing if the loading is complete or not. */ private _isLoadingComplete; /** * Has the file finished downloading from the remote server. */ get isLoadingComplete(): boolean; /** * An ArrayBuffer instance that holds the data loaded for this file, do not keep a local copy of this variable as * it could be replaced as the file loads into memory. */ private buffer; /** * The source from which the file should be loaded. */ private source; /** * @param source - The source from where this instance should load its file contents. */ constructor(source: RemoteFileSourceBrowser); /** * This function must ba called in order to start downloading the file, if this function fail the file cannot be * fetched from the server. */ startDownloading(): Promise; /** * Loads the file into an ArrayBuffer. Optionally a `start` and `end` can be specified to load a part of the file. * @param start - The offset at which the data will start loading * @param end - The offset at which the data will stop loading */ loadData(start?: number, end?: number): Promise; /** * Reads the data from a remote response using streams, this allows for data to be processed even if the file has * not been completely loaded. * @param response - A response object returned by `fetch`. This object will be used to retrieve the read stream. */ private readFileStream; }