API / geotoolkit / util / stream / BrowserFileStream / BrowserFileStream
stream.BrowserFileStream.BrowserFileStream
A stream implementation using a browser File object and a browser FileReader.
This implementation relies on the HTML5 File API.
Constructors
Methods
▸ dispose(): void
Dispose
void
▸ getClassName(): string
string
▸ getSize(): number
Returns the size of the underlying data
number
size The size
▸ getStride(): number
Returns the stride of this stream
number
stride The stride
▸ readChunk(offset, length, callback): BrowserFileStream
Read a chunk of data and calls the callback when it's done.
| Name | Type | Description |
|---|---|---|
offset | number | The position to start reading from |
length | number | The amount of bytes to read |
callback | (err: Error, buffer: Int8Array | Int16Array, bytesRead: number) => void | The callback that will be called with the result |
this
▸ Static getClassName(): string
string