INodeBuffer interface

Represents a Buffer from the net module in Node.js. This interface supports the framework and is not intended to be called directly for your code.

Extends

Uint8Array

Properties

constructor
Uint8Array

Inherited Properties

buffer

The ArrayBuffer instance referenced by the array.

byteLength

The length in bytes of the array.

byteOffset

The offset in bytes of the array.

BYTES_PER_ELEMENT

The size in bytes of each element in the array.

length

The length of the array.

Methods

compare(Uint8Array, number, number, number, number)
copy(Uint8Array, number, number, number)
entries()
equals(Uint8Array)
fill(any, number, number)
includes(string | number | this, number, string)
indexOf(string | number | Uint8Array, number, string)
keys()
lastIndexOf(string | number | Uint8Array, number, string)
readDoubleBE(number, boolean)
readDoubleLE(number, boolean)
readFloatBE(number, boolean)
readFloatLE(number, boolean)
readInt16BE(number, boolean)
readInt16LE(number, boolean)
readInt32BE(number, boolean)
readInt32LE(number, boolean)
readInt8(number, boolean)
readIntBE(number, number, boolean)
readIntLE(number, number, boolean)
readUInt16BE(number, boolean)
readUInt16LE(number, boolean)
readUInt32BE(number, boolean)
readUInt32LE(number, boolean)
readUInt8(number, boolean)
readUIntBE(number, number, boolean)
readUIntLE(number, number, boolean)
slice(number, number)
swap16()
swap32()
swap64()
toJSON()
toString(string, number, number)
values()
write(string, number, number, string)
writeDoubleBE(number, number, boolean)
writeDoubleLE(number, number, boolean)
writeFloatBE(number, number, boolean)
writeFloatLE(number, number, boolean)
writeInt16BE(number, number, boolean)
writeInt16LE(number, number, boolean)
writeInt32BE(number, number, boolean)
writeInt32LE(number, number, boolean)
writeInt8(number, number, boolean)
writeIntBE(number, number, number, boolean)
writeIntLE(number, number, number, boolean)
writeUInt16BE(number, number, boolean)
writeUInt16LE(number, number, boolean)
writeUInt32BE(number, number, boolean)
writeUInt32LE(number, number, boolean)
writeUInt8(number, number, boolean)
writeUIntBE(number, number, number, boolean)
writeUIntLE(number, number, number, boolean)

Inherited Methods

copyWithin(number, number, number)

Returns the this object after copying a section of the array identified by start and end to the same array starting at position target

every((value: number, index: number, array: Uint8Array) => boolean, any)

Determines whether all the members of an array satisfy the specified test.

filter((value: number, index: number, array: Uint8Array) => any, any)

Returns the elements of an array that meet the condition specified in a callback function.

find((value: number, index: number, obj: Uint8Array) => boolean, any)

Returns the value of the first element in the array where predicate is true, and undefined otherwise.

findIndex((value: number, index: number, obj: Uint8Array) => boolean, any)

Returns the index of the first element in the array where predicate is true, and -1 otherwise.

forEach((value: number, index: number, array: Uint8Array) => void, any)

Performs the specified action for each element in an array.

join(string)

Adds all the elements of an array separated by the specified separator string.

map((value: number, index: number, array: Uint8Array) => number, any)

Calls a defined callback function on each element of an array, and returns an array that contains the results.

reduce((previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number)

Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

reduce((previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, number)
reduce<U>((previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, U)

Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

reduceRight((previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number)

Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

reduceRight((previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, number)
reduceRight<U>((previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, U)

Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

reverse()

Reverses the elements in an Array.

set(ArrayLike<number>, number)

Sets a value or an array of values.

some((value: number, index: number, array: Uint8Array) => boolean, any)

Determines whether the specified callback function returns true for any element of an array.

sort((a: number, b: number) => number)

Sorts an array.

subarray(number, number)

Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements at begin, inclusive, up to end, exclusive.

toLocaleString()

Converts a number to a string by using the current locale.

Property Details

constructor

constructor: any

Property Value

any

Uint8Array

Uint8Array: Uint8ArrayConstructor

Property Value

Uint8ArrayConstructor

Inherited Property Details

buffer

The ArrayBuffer instance referenced by the array.

buffer: ArrayBufferLike

Property Value

ArrayBufferLike

Inherited From Uint8Array.buffer

byteLength

The length in bytes of the array.

byteLength: number

Property Value

number

Inherited From Uint8Array.byteLength

byteOffset

The offset in bytes of the array.

byteOffset: number

Property Value

number

Inherited From Uint8Array.byteOffset

BYTES_PER_ELEMENT

The size in bytes of each element in the array.

BYTES_PER_ELEMENT: number

Property Value

number

Inherited From Uint8Array.BYTES_PER_ELEMENT

length

The length of the array.

length: number

Property Value

number

Inherited From Uint8Array.length

Method Details

compare(Uint8Array, number, number, number, number)

function compare(otherBuffer: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number

Parameters

otherBuffer

Uint8Array

targetStart

number

targetEnd

number

sourceStart

number

sourceEnd

number

Returns

number

copy(Uint8Array, number, number, number)

function copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number

Parameters

targetBuffer

Uint8Array

targetStart

number

sourceStart

number

sourceEnd

number

Returns

number

entries()

function entries(): IterableIterator<[number, number]>

Returns

IterableIterator<[number, number]>

equals(Uint8Array)

function equals(otherBuffer: Uint8Array): boolean

Parameters

otherBuffer

Uint8Array

Returns

boolean

fill(any, number, number)

function fill(value: any, offset?: number, end?: number): this

Parameters

value

any

offset

number

end

number

Returns

this

includes(string | number | this, number, string)

function includes(value: string | number | this, byteOffset?: number, encoding?: string): boolean

Parameters

value

string | number | this

byteOffset

number

encoding

string

Returns

boolean

indexOf(string | number | Uint8Array, number, string)

function indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: string): number

Parameters

value

string | number | Uint8Array

byteOffset

number

encoding

string

Returns

number

keys()

function keys(): IterableIterator<number>

Returns

IterableIterator<number>

lastIndexOf(string | number | Uint8Array, number, string)

function lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: string): number

Parameters

value

string | number | Uint8Array

byteOffset

number

encoding

string

Returns

number

readDoubleBE(number, boolean)

function readDoubleBE(offset: number, noAssert?: boolean): number

Parameters

offset

number

noAssert

boolean

Returns

number

readDoubleLE(number, boolean)

function readDoubleLE(offset: number, noAssert?: boolean): number

Parameters

offset

number

noAssert

boolean

Returns

number

readFloatBE(number, boolean)

function readFloatBE(offset: number, noAssert?: boolean): number

Parameters

offset

number

noAssert

boolean

Returns

number

readFloatLE(number, boolean)

function readFloatLE(offset: number, noAssert?: boolean): number

Parameters

offset

number

noAssert

boolean

Returns

number

readInt16BE(number, boolean)

function readInt16BE(offset: number, noAssert?: boolean): number

Parameters

offset

number

noAssert

boolean

Returns

number

readInt16LE(number, boolean)

function readInt16LE(offset: number, noAssert?: boolean): number

Parameters

offset

number

noAssert

boolean

Returns

number

readInt32BE(number, boolean)

function readInt32BE(offset: number, noAssert?: boolean): number

Parameters

offset

number

noAssert

boolean

Returns

number

readInt32LE(number, boolean)

function readInt32LE(offset: number, noAssert?: boolean): number

Parameters

offset

number

noAssert

boolean

Returns

number

readInt8(number, boolean)

function readInt8(offset: number, noAssert?: boolean): number

Parameters

offset

number

noAssert

boolean

Returns

number

readIntBE(number, number, boolean)

function readIntBE(offset: number, byteLength: number, noAssert?: boolean): number

Parameters

offset

number

byteLength

number

noAssert

boolean

Returns

number

readIntLE(number, number, boolean)

function readIntLE(offset: number, byteLength: number, noAssert?: boolean): number

Parameters

offset

number

byteLength

number

noAssert

boolean

Returns

number

readUInt16BE(number, boolean)

function readUInt16BE(offset: number, noAssert?: boolean): number

Parameters

offset

number

noAssert

boolean

Returns

number

readUInt16LE(number, boolean)

function readUInt16LE(offset: number, noAssert?: boolean): number

Parameters

offset

number

noAssert

boolean

Returns

number

readUInt32BE(number, boolean)

function readUInt32BE(offset: number, noAssert?: boolean): number

Parameters

offset

number

noAssert

boolean

Returns

number

readUInt32LE(number, boolean)

function readUInt32LE(offset: number, noAssert?: boolean): number

Parameters

offset

number

noAssert

boolean

Returns

number

readUInt8(number, boolean)

function readUInt8(offset: number, noAssert?: boolean): number

Parameters

offset

number

noAssert

boolean

Returns

number

readUIntBE(number, number, boolean)

function readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number

Parameters

offset

number

byteLength

number

noAssert

boolean

Returns

number

readUIntLE(number, number, boolean)

function readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number

Parameters

offset

number

byteLength

number

noAssert

boolean

Returns

number

slice(number, number)

function slice(start?: number, end?: number): this

Parameters

start

number

end

number

Returns

this

swap16()

function swap16(): this

Returns

this

swap32()

function swap32(): this

Returns

this

swap64()

function swap64(): this

Returns

this

toJSON()

function toJSON(): { data: any[], type: "Buffer" }

Returns

{ data: any[], type: "Buffer" }

toString(string, number, number)

function toString(encoding?: string, start?: number, end?: number): string

Parameters

encoding

string

start

number

end

number

Returns

string

values()

function values(): IterableIterator<number>

Returns

IterableIterator<number>

write(string, number, number, string)

function write(string: string, offset?: number, length?: number, encoding?: string): number

Parameters

string

string

offset

number

length

number

encoding

string

Returns

number

writeDoubleBE(number, number, boolean)

function writeDoubleBE(value: number, offset: number, noAssert?: boolean): number

Parameters

value

number

offset

number

noAssert

boolean

Returns

number

writeDoubleLE(number, number, boolean)

function writeDoubleLE(value: number, offset: number, noAssert?: boolean): number

Parameters

value

number

offset

number

noAssert

boolean

Returns

number

writeFloatBE(number, number, boolean)

function writeFloatBE(value: number, offset: number, noAssert?: boolean): number

Parameters

value

number

offset

number

noAssert

boolean

Returns

number

writeFloatLE(number, number, boolean)

function writeFloatLE(value: number, offset: number, noAssert?: boolean): number

Parameters

value

number

offset

number

noAssert

boolean

Returns

number

writeInt16BE(number, number, boolean)

function writeInt16BE(value: number, offset: number, noAssert?: boolean): number

Parameters

value

number

offset

number

noAssert

boolean

Returns

number

writeInt16LE(number, number, boolean)

function writeInt16LE(value: number, offset: number, noAssert?: boolean): number

Parameters

value

number

offset

number

noAssert

boolean

Returns

number

writeInt32BE(number, number, boolean)

function writeInt32BE(value: number, offset: number, noAssert?: boolean): number

Parameters

value

number

offset

number

noAssert

boolean

Returns

number

writeInt32LE(number, number, boolean)

function writeInt32LE(value: number, offset: number, noAssert?: boolean): number

Parameters

value

number

offset

number

noAssert

boolean

Returns

number

writeInt8(number, number, boolean)

function writeInt8(value: number, offset: number, noAssert?: boolean): number

Parameters

value

number

offset

number

noAssert

boolean

Returns

number

writeIntBE(number, number, number, boolean)

function writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number

Parameters

value

number

offset

number

byteLength

number

noAssert

boolean

Returns

number

writeIntLE(number, number, number, boolean)

function writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number

Parameters

value

number

offset

number

byteLength

number

noAssert

boolean

Returns

number

writeUInt16BE(number, number, boolean)

function writeUInt16BE(value: number, offset: number, noAssert?: boolean): number

Parameters

value

number

offset

number

noAssert

boolean

Returns

number

writeUInt16LE(number, number, boolean)

function writeUInt16LE(value: number, offset: number, noAssert?: boolean): number

Parameters

value

number

offset

number

noAssert

boolean

Returns

number

writeUInt32BE(number, number, boolean)

function writeUInt32BE(value: number, offset: number, noAssert?: boolean): number

Parameters

value

number

offset

number

noAssert

boolean

Returns

number

writeUInt32LE(number, number, boolean)

function writeUInt32LE(value: number, offset: number, noAssert?: boolean): number

Parameters

value

number

offset

number

noAssert

boolean

Returns

number

writeUInt8(number, number, boolean)

function writeUInt8(value: number, offset: number, noAssert?: boolean): number

Parameters

value

number

offset

number

noAssert

boolean

Returns

number

writeUIntBE(number, number, number, boolean)

function writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number

Parameters

value

number

offset

number

byteLength

number

noAssert

boolean

Returns

number

writeUIntLE(number, number, number, boolean)

function writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number

Parameters

value

number

offset

number

byteLength

number

noAssert

boolean

Returns

number

Inherited Method Details

copyWithin(number, number, number)

Returns the this object after copying a section of the array identified by start and end to the same array starting at position target

function copyWithin(target: number, start: number, end?: number): this

Parameters

target

number

If target is negative, it is treated as length+target where length is the length of the array.

start

number

If start is negative, it is treated as length+start. If end is negative, it is treated as length+end.

end

number

If not specified, length of the this object is used as its default value.

Returns

this

Inherited From Uint8Array.copyWithin

every((value: number, index: number, array: Uint8Array) => boolean, any)

Determines whether all the members of an array satisfy the specified test.

function every(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean

Parameters

callbackfn

(value: number, index: number, array: Uint8Array) => boolean

A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.

thisArg

any

An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns

boolean

Inherited From Uint8Array.every

filter((value: number, index: number, array: Uint8Array) => any, any)

Returns the elements of an array that meet the condition specified in a callback function.

function filter(callbackfn: (value: number, index: number, array: Uint8Array) => any, thisArg?: any): Uint8Array

Parameters

callbackfn

(value: number, index: number, array: Uint8Array) => any

A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.

thisArg

any

An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns

Uint8Array

Inherited From Uint8Array.filter

find((value: number, index: number, obj: Uint8Array) => boolean, any)

Returns the value of the first element in the array where predicate is true, and undefined otherwise.

function find(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number | undefined

Parameters

predicate

(value: number, index: number, obj: Uint8Array) => boolean

find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.

thisArg

any

If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

Returns

number | undefined

Inherited From Uint8Array.find

findIndex((value: number, index: number, obj: Uint8Array) => boolean, any)

Returns the index of the first element in the array where predicate is true, and -1 otherwise.

function findIndex(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number

Parameters

predicate

(value: number, index: number, obj: Uint8Array) => boolean

find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, findIndex immediately returns that element index. Otherwise, findIndex returns -1.

thisArg

any

If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

Returns

number

Inherited From Uint8Array.findIndex

forEach((value: number, index: number, array: Uint8Array) => void, any)

Performs the specified action for each element in an array.

function forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any)

Parameters

callbackfn

(value: number, index: number, array: Uint8Array) => void

A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.

thisArg

any

An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Inherited From Uint8Array.forEach

join(string)

Adds all the elements of an array separated by the specified separator string.

function join(separator?: string): string

Parameters

separator

string

A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.

Returns

string

Inherited From Uint8Array.join

map((value: number, index: number, array: Uint8Array) => number, any)

Calls a defined callback function on each element of an array, and returns an array that contains the results.

function map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array

Parameters

callbackfn

(value: number, index: number, array: Uint8Array) => number

A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.

thisArg

any

An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns

Uint8Array

Inherited From Uint8Array.map

reduce((previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number)

Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

function reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number

Parameters

callbackfn

(previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number

A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.

Returns

number

Inherited From Uint8Array.reduce

reduce((previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, number)

function reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number

Parameters

callbackfn

(previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number

initialValue

number

Returns

number

Inherited From Uint8Array.reduce

reduce<U>((previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, U)

Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

function reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U

Parameters

callbackfn

(previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U

A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.

initialValue

U

If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

Returns

U

Inherited From Uint8Array.reduce

reduceRight((previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number)

Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

function reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number

Parameters

callbackfn

(previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number

A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.

Returns

number

Inherited From Uint8Array.reduceRight

reduceRight((previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, number)

function reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number

Parameters

callbackfn

(previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number

initialValue

number

Returns

number

Inherited From Uint8Array.reduceRight

reduceRight<U>((previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, U)

Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

function reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U

Parameters

callbackfn

(previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U

A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.

initialValue

U

If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

Returns

U

Inherited From Uint8Array.reduceRight

reverse()

Reverses the elements in an Array.

function reverse(): Uint8Array

Returns

Uint8Array

Inherited From Uint8Array.reverse

set(ArrayLike<number>, number)

Sets a value or an array of values.

function set(array: ArrayLike<number>, offset?: number)

Parameters

array

ArrayLike<number>

A typed or untyped array of values to set.

offset

number

The index in the current array at which the values are to be written.

Inherited From Uint8Array.set

some((value: number, index: number, array: Uint8Array) => boolean, any)

Determines whether the specified callback function returns true for any element of an array.

function some(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean

Parameters

callbackfn

(value: number, index: number, array: Uint8Array) => boolean

A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.

thisArg

any

An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns

boolean

Inherited From Uint8Array.some

sort((a: number, b: number) => number)

Sorts an array.

function sort(compareFn?: (a: number, b: number) => number): this

Parameters

compareFn

(a: number, b: number) => number

The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.

Returns

this

Inherited From Uint8Array.sort

subarray(number, number)

Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements at begin, inclusive, up to end, exclusive.

function subarray(begin: number, end?: number): Uint8Array

Parameters

begin

number

The index of the beginning of the array.

end

number

The index of the end of the array.

Returns

Uint8Array

Inherited From Uint8Array.subarray

toLocaleString()

Converts a number to a string by using the current locale.

function toLocaleString(): string

Returns

string

Inherited From Uint8Array.toLocaleString