Binary Data APIs
The built-in Array plugin SDK instance exposes the following APIs.
- Set the contents of the Binary Data object by copying
viewOrBuffer, which can be either an ArrayBuffer or a typed array.
- Set the contents of the Binary Object by taking ownership of the passed ArrayBuffer. This avoids copying the data, but the caller must not use the passed ArrayBuffer any more.
- Return an ArrayBuffer which is a copy of the contents of the Binary Data object. Since a copy is returned the caller may modify the returned ArrayBuffer.
- Return a direct reference to the ArrayBuffer representing the contents of the Binary Data object. This must not be modified by the caller. However this avoids copying the data if used for read-only purposes, e.g. sending down a WebSocket.
Addon SDK Manual
You are here:
Search this manual:
This manual entry was last updated on 12 Apr, 2019 at 17:52