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

Method writeByteArray

lib/utils/ByteArray.ts:44–53  ·  view source on GitHub ↗
(ba: ByteArray)

Source from the content-addressed store, hash-verified

42 }
43
44 public writeByteArray(ba: ByteArray): void {
45 this.ensureWriteableSpace(ba.length);
46
47 const inInt8AView: Int8Array = new Int8Array(ba.arraybytes, 0, ba.length);
48 const localInt8View: Int8Array = new Int8Array(this.arraybytes, this.length, ba.length);
49 localInt8View.set(inInt8AView);
50 this.length += ba.length;
51 this.position = this.length;
52
53 }
54
55 public getBytesAvailable(): number {
56 return (this.length) - (this.position);

Callers

nothing calls this directly

Calls 2

ensureWriteableSpaceMethod · 0.95
setMethod · 0.80

Tested by

no test coverage detected