MCPcopy Index your code
hub / github.com/awayjs/core / writeArrayBuffer

Method writeArrayBuffer

lib/utils/ByteArray.ts:33–42  ·  view source on GitHub ↗
(aBuffer: ArrayBuffer)

Source from the content-addressed store, hash-verified

31 }
32
33 public writeArrayBuffer(aBuffer: ArrayBuffer): void {
34 this.ensureWriteableSpace(aBuffer.byteLength);
35
36 const inInt8AView: Int8Array = new Int8Array(aBuffer);
37 const localInt8View: Int8Array = new Int8Array(this.arraybytes, this.length, aBuffer.byteLength);
38 localInt8View.set(inInt8AView);
39 this.length += aBuffer.byteLength;
40 this.position = this.length;
41
42 }
43
44 public writeByteArray(ba: ByteArray): void {
45 this.ensureWriteableSpace(ba.length);

Callers

nothing calls this directly

Calls 2

ensureWriteableSpaceMethod · 0.95
setMethod · 0.80

Tested by

no test coverage detected