Class BufferList

Hierarchy

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(opts?: DuplexOptions): Duplex

Parameters

Returns

Duplex

Properties

public length: number

public readable: boolean

public writable: boolean

Methods

public _read(size: number)

Parameters

  • size: number

public _write(data: Buffer, encoding: string, callback: Function)

Parameters

  • data: Buffer
  • encoding: string
  • callback: Function

public _write(data: string, encoding: string, callback: Function)

Parameters

  • data: string
  • encoding: string
  • callback: Function

public addListener(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public append(buffer: Buffer)

Parameters

public consume(bytes?: number)

Parameters

  • bytes?: number optional

public copy(dest: Buffer, destStart?: number, srcStart?: number, srcEnd?: number)

Parameters

  • dest: Buffer
  • destStart?: number optional
  • srcStart?: number optional
  • srcEnd?: number optional

public duplicate(): BufferList

Returns

BufferList

public emit(event: string, args?: Array<any>): boolean

Parameters

  • event: string
  • args?: Array<any> optional

Returns

boolean

public end()

public end(buffer: Buffer, cb?: Function)

Parameters

  • buffer: Buffer
  • cb?: Function optional

public end(str: string, cb?: Function)

Parameters

  • str: string
  • cb?: Function optional

public end(str: string, encoding?: string, cb?: Function)

Parameters

  • str: string
  • encoding?: string optional
  • cb?: Function optional

public get(index: number): number

Parameters

  • index: number

Returns

number

public listeners(event: string): Array<Function>

Parameters

  • event: string

Returns

Array<Function>

public new(callback?: (err: Error, buffer: Buffer) => void)

Parameters

  • callback?: (err: Error, buffer: Buffer) => void optional

public on(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public once(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public pause()

public pipe(destination: T, options?: { end?: boolean; }): T

Parameters

  • destination: T
  • options?: { end?: boolean; } optional

Returns

T

public push(chunk: any, encoding?: string): boolean

Parameters

  • chunk: any
  • encoding?: string optional

Returns

boolean

public read(size?: number): any

Parameters

  • size?: number optional

Returns

any

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

Buffer

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

Buffer

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

Buffer

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

Buffer

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

Buffer

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

Buffer

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

Buffer

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

Buffer

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

Buffer

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

Buffer

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

Buffer

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

Buffer

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

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

Buffer

public readUInt8(offset: number, noAssert?: boolean): Buffer

Parameters

  • offset: number
  • noAssert?: boolean optional

Returns

Buffer

public removeAllListeners(event?: string): EventEmitter

Parameters

  • event?: string optional

Returns

EventEmitter

public removeListener(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public resume()

public setEncoding(encoding: string)

Parameters

  • encoding: string

public setMaxListeners(n: number)

Parameters

  • n: number

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

Parameters

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

Returns

Buffer

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

Parameters

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

Returns

string

public unpipe(destination?: T)

Parameters

  • destination?: T optional

public unshift(chunk: string)

Parameters

  • chunk: string

public unshift(chunk: Buffer)

Parameters

public wrap(oldStream: ReadableStream): ReadableStream

Parameters

Returns

ReadableStream

public write(buffer: Buffer, cb?: Function): boolean

Parameters

  • buffer: Buffer
  • cb?: Function optional

Returns

boolean

public write(str: string, cb?: Function): boolean

Parameters

  • str: string
  • cb?: Function optional

Returns

boolean

public write(str: string, encoding?: string, cb?: Function): boolean

Parameters

  • str: string
  • encoding?: string optional
  • cb?: Function optional

Returns

boolean