read

Read raw bytes from a BinaryFile in a BrowserPod Pod, returning the requested length of data as an ArrayBuffer.

class BinaryFile {
async read(length: int): Promise<ArrayBuffer>;
}

Parameters

  • length (int) - Length in bytes of the data to be read.

Returns

read returns a Promise which is resolved when the operation has succeeded. The promise resolves to an ArrayBuffer containing the data that was read. On success the seek position is updated. If there is an error during the read, the Promise will be rejected.

Was this page helpful?
Suggest changes