Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BufferStream

Hierarchy

  • Transform
    • BufferStream

Implements

  • ReadableStream
  • Writable

Constructors

constructor

Properties

Private chunks

chunks: Array<Buffer> = []

readable

readable: boolean

readableHighWaterMark

readableHighWaterMark: number

readableLength

readableLength: number

writable

writable: boolean

writableHighWaterMark

writableHighWaterMark: number

writableLength

writableLength: number

Static defaultMaxListeners

defaultMaxListeners: number

Methods

[Symbol.asyncIterator]

  • [Symbol.asyncIterator](): AsyncIterableIterator<any>

_destroy

  • _destroy(error: Error | null, callback: function): void

_final

  • _final(callback: function): void

_flush

  • _flush(cb: any): void

_read

  • _read(size: number): void

_transform

  • _transform(chunk: Buffer, encoding: string, cb: any): void

_write

  • _write(chunk: any, encoding: string, callback: function): void

Optional _writev

  • _writev(chunks: Array<object>, callback: function): void

addListener

  • addListener(event: "close", listener: function): this
  • addListener(event: "data", listener: function): this
  • addListener(event: "end", listener: function): this
  • addListener(event: "readable", listener: function): this
  • addListener(event: "error", listener: function): this
  • addListener(event: string | symbol, listener: function): this

cork

  • cork(): void

destroy

  • destroy(error?: Error): void

emit

  • emit(event: "close"): boolean
  • emit(event: "data", chunk: any): boolean
  • emit(event: "end"): boolean
  • emit(event: "readable"): boolean
  • emit(event: "error", err: Error): boolean
  • emit(event: string | symbol, ...args: any[]): boolean

end

  • end(cb?: undefined | function): void
  • end(chunk: any, cb?: undefined | function): void
  • end(chunk: any, encoding?: undefined | string, cb?: undefined | function): void

eventNames

  • eventNames(): Array<string | symbol>

getMaxListeners

  • getMaxListeners(): number

isPaused

  • isPaused(): boolean

listenerCount

  • listenerCount(type: string | symbol): number

listeners

  • listeners(event: string | symbol): Function[]

off

  • off(event: string | symbol, listener: function): this

on

  • on(event: "close", listener: function): this
  • on(event: "data", listener: function): this
  • on(event: "end", listener: function): this
  • on(event: "readable", listener: function): this
  • on(event: "error", listener: function): this
  • on(event: string | symbol, listener: function): this

once

  • once(event: "close", listener: function): this
  • once(event: "data", listener: function): this
  • once(event: "end", listener: function): this
  • once(event: "readable", listener: function): this
  • once(event: "error", listener: function): this
  • once(event: string | symbol, listener: function): this

pause

  • pause(): this

pipe

  • pipe<T>(destination: T, options?: undefined | object): T

prependListener

  • prependListener(event: "close", listener: function): this
  • prependListener(event: "data", listener: function): this
  • prependListener(event: "end", listener: function): this
  • prependListener(event: "readable", listener: function): this
  • prependListener(event: "error", listener: function): this
  • prependListener(event: string | symbol, listener: function): this

prependOnceListener

  • prependOnceListener(event: "close", listener: function): this
  • prependOnceListener(event: "data", listener: function): this
  • prependOnceListener(event: "end", listener: function): this
  • prependOnceListener(event: "readable", listener: function): this
  • prependOnceListener(event: "error", listener: function): this
  • prependOnceListener(event: string | symbol, listener: function): this

push

  • push(chunk: any, encoding?: undefined | string): boolean

rawListeners

  • rawListeners(event: string | symbol): Function[]

read

  • read(size?: undefined | number): any

removeAllListeners

  • removeAllListeners(event?: string | symbol): this

removeListener

  • removeListener(event: "close", listener: function): this
  • removeListener(event: "data", listener: function): this
  • removeListener(event: "end", listener: function): this
  • removeListener(event: "readable", listener: function): this
  • removeListener(event: "error", listener: function): this
  • removeListener(event: string | symbol, listener: function): this

resume

  • resume(): this

setDefaultEncoding

  • setDefaultEncoding(encoding: string): this

setEncoding

  • setEncoding(encoding: string): this

setMaxListeners

  • setMaxListeners(n: number): this

uncork

  • uncork(): void

unpipe

  • unpipe(destination?: NodeJS.WritableStream): this

unshift

  • unshift(chunk: any): void

wrap

  • wrap(oldStream: ReadableStream): this

write

  • write(chunk: any, cb?: undefined | function): boolean
  • write(chunk: any, encoding?: undefined | string, cb?: undefined | function): boolean

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number

Generated using TypeDoc