API / geotoolkit / util / stream / IReadable / IReadable
A data stream, typical implementation include FileStream or MemoryStream.
This interface for class offers 'random' access to the underlying data without requiring to load the whole data in memory.
Interface
↳
IReadable
Constructors
Methods
▸ Abstract dispose(): void
Dispose
void
▸ Abstract getSize(): number
Returns the size of the underlying data
number
size The size
▸ Abstract getStride(): number
Returns the stride of this stream
number
stride The stride
▸ Abstract readChunk(offset, length, callback): IReadable
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