Interface Buffer

deprecated

Hierarchy

Index

Index signatures

Properties

Methods

Index signatures

(index: number): number

Parameters

  • index: number

Returns

number

(index: number): number

Parameters

  • index: number

Returns

number

Properties

public length: number

Methods

public address(): number

Shorthand for ref.address.

Returns

number

public copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number

Parameters

  • targetBuffer: Buffer
  • targetStart?: number optional
  • sourceStart?: number optional
  • sourceEnd?: number optional

Returns

number

public copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number

Parameters

  • targetBuffer: Buffer
  • targetStart?: number optional
  • sourceStart?: number optional
  • sourceEnd?: number optional

Returns

number

public deref(): any

Shorthand for ref.deref.

Returns

any

public fill(value: any, offset?: number, end?: number)

Parameters

  • value: any
  • offset?: number optional
  • end?: number optional

public fill(value: any, offset?: number, end?: number)

Parameters

  • value: any
  • offset?: number optional
  • end?: number optional

public inspect(): string

Generate string for inspecting. String includes the hex-encoded memory address of the Buffer instance.

override

Returns

string

public isNull(): boolean

Shorthand for ref.isNull.

Returns

boolean

public readCString(offset?: number): string

Shorthand for ref.readCString.

Parameters

  • offset?: number optional

Returns

string

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

public readInt64BE(offset?: number): string

Shorthand for ref.readInt64BE.

Parameters

  • offset?: number optional

Returns

string

public readInt64LE(offset?: number): string

Shorthand for ref.readInt64LE.

Parameters

  • offset?: number optional

Returns

string

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

public readObject(offset?: number): string

Shorthand for ref.readObject.

Parameters

  • offset?: number optional

Returns

string

public readPointer(offset?: number): string

Shorthand for ref.readPointer.

Parameters

  • offset?: number optional

Returns

string

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

number

public readUInt64BE(offset?: number): string

Shorthand for ref.readUInt64BE.

Parameters

  • offset?: number optional

Returns

string

public readUInt64LE(offset?: number): string

Shorthand for ref.readUInt64LE.

Parameters

  • offset?: number optional

Returns

string

public readUInt8(offset: number, noAsset?: boolean): number

Parameters

  • offset: number
  • noAsset?: boolean optional

Returns

number

public readUInt8(offset: number, noAsset?: boolean): number

Parameters

  • offset: number
  • noAsset?: boolean optional

Returns

number

public ref(): Buffer

Shorthand for ref.ref.

Returns

Buffer

public reinterpret(size: number, offset?: number): Buffer

Shorthand for ref.reinterpret.

Parameters

  • size: number
  • offset?: number optional

Returns

Buffer

public reinterpretUntilZeros(size: number, offset?: number): Buffer

Shorthand for ref.reinterpretUntilZeros.

Parameters

  • size: number
  • offset?: number optional

Returns

Buffer

public slice(start?: number, end?: number): Buffer

Parameters

  • start?: number optional
  • end?: number optional

Returns

Buffer

public slice(start?: number, end?: number): Buffer

Parameters

  • start?: number optional
  • end?: number optional

Returns

Buffer

public toJSON(): any

Returns

any

public toJSON(): any

Returns

any

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

Parameters

  • encoding?: string optional
  • start?: number optional
  • end?: number optional

Returns

string

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

Parameters

  • encoding?: string optional
  • start?: number optional
  • end?: number optional

Returns

string

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

Parameters

  • string: string
  • offset?: number optional
  • length?: number optional
  • encoding?: string optional

Returns

number

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

Parameters

  • string: string
  • offset?: number optional
  • length?: number optional
  • encoding?: string optional

Returns

number

public writeCString(offset: number, string: string, encoding?: string)

Shorthand for ref.writeCString.

Parameters

  • offset: number
  • string: string
  • encoding?: string optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

public writeInt64BE(offset: number, input: number): any

Shorthand for ref.writeInt64BE.

Parameters

  • offset: number
  • input: number

Returns

any

public writeInt64BE(offset: number, input: string): any

Shorthand for ref.writeInt64BE.

Parameters

  • offset: number
  • input: string

Returns

any

public writeInt64LE(offset: number, input: number): any

Shorthand for ref.writeInt64LE.

Parameters

  • offset: number
  • input: number

Returns

any

public writeInt64LE(offset: number, input: string): any

Shorthand for ref.writeInt64LE.

Parameters

  • offset: number
  • input: string

Returns

any

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

public writeObject(offset: number, object: Object)

Shorthand for ref.writeObject.

Parameters

  • offset: number
  • object: Object

public writePointer(offset: number, pointer: Buffer)

Shorthand for ref.writePointer.

Parameters

  • offset: number
  • pointer: Buffer

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

public writeUInt64BE(offset: number, input: number): any

Shorthand for ref.writeUInt64BE.

Parameters

  • offset: number
  • input: number

Returns

any

public writeUInt64BE(offset: number, input: string): any

Shorthand for ref.writeUInt64BE.

Parameters

  • offset: number
  • input: string

Returns

any

public writeUInt64LE(offset: number, input: number): any

Shorthand for ref.writeUInt64LE.

Parameters

  • offset: number
  • input: number

Returns

any

public writeUInt64LE(offset: number, input: string): any

Shorthand for ref.writeUInt64LE.

Parameters

  • offset: number
  • input: string

Returns

any

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional

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

Parameters

  • value: number
  • offset: number
  • noAssert?: boolean optional