Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace BinaryBufferWriteableStream

Index

Functions

create

Methods

destroy

  • destroy(): void

end

  • Signals the end of the stream to the consumer. If the result is not an error, will trigger the on('data') event listener if the stream is flowing and buffer the data otherwise until the stream is flowing.

    In case of an error, the on('error') event will be used if the stream is flowing.

    Parameters

    Returns void

error

  • error(error: Error): void

on

  • on(event: "data", callback: (data: BinaryBuffer) => void): void
  • on(event: "error", callback: (err: Error) => void): void
  • on(event: "end", callback: () => void): void

pause

  • pause(): void

removeListener

  • removeListener(event: string, callback: Function): void

resume

  • resume(): void

write

  • Writing data to the stream will trigger the on('data') event listener if the stream is flowing and buffer the data otherwise until the stream is flowing.

    If a highWaterMark is configured and writing to the stream reaches this mark, a promise will be returned that should be awaited on before writing more data. Otherwise there is a risk of buffering a large number of data chunks without consumer.

    Parameters

    Returns void | Promise<void>