Interface Buffer

Index

Methods

Methods

public address(): number

Shorthand for ref.address.

Returns

number

public deref(): any

Shorthand for ref.deref.

Returns

any

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 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 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 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 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 writeCString(offset: number, string: string, encoding?: string)

Shorthand for ref.writeCString.

Parameters

  • offset: number
  • string: string
  • encoding?: string 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 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 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