The source from where this instance should load its file contents.
Fired when the data loading finishes.
Fired when data loading progresses. Not fired when data loading finishes.
Fired when data loading progresses. Not fired when data loading finishes.
Variable to hold the byte length of the loaded file.
Variable to hold the bytes loaded so far from the remote file.
Variable that holds a boolean describing if the loading is complete or not.
Variable that holds a promise that resolves when the file finishes loading
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.
Map of registered event listeners with this instance.
Returns a symbol that can be used to register an omni-listener.
The source from which the file should be loaded.
The total length, in bytes, of the file this instance represents.
Bytes loaded for this file, useful when parsing streaming files.
Has the file finished downloading from the remote server.
Promise that resolves when this file has finished downloading from the remote server.
Emit an event to all event listeners register for that specific event and omni-listeners (listeners registered
wising * as the event type).
The event to emit, cannot be *
Parameters to pass to the callback functions registered for this event
Loads the file into an ArrayBuffer. Optionally a start and end can be specified to load a part of the file.
The offset at which the data will start loading
The offset at which the data will stop loading
Unregister an event listener callback.
The event to unregister from
Callback function to remove
Register an event listener callback for the specified event.
NOTE: Pass * as the event type to listen to all event emitted by this instance.
The event to listen for
Called when the event is emitted by this instance
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.
A response object returned by fetch. This object will be used to retrieve the read stream.
Slices the file and returns a data chunk pointing at the data within the specified boundaries.
Pointer to the start of the data in bytes
Pointer to the end of the data in bytes
This function must ba called in order to start downloading the file, if this function fail the file cannot be fetched from the server.
Utility function to wrap a file as a DataFile for this platform.
NOTE: This function calls startDownloading on the file.
The file to wrap
Mixin method that holds the EventEmitter implementation, this function is exposed through EventEmitter.mixin.
The parent class into which the EventEmitter implementation will be mixed in.
Generated using TypeDoc
Represents a remote data file on the browser platform.