Class: Buffer

Buffer(bufferSize)

Buffer that can be used for buffered streams.

Constructor

new Buffer(bufferSize)

Instantiate a cache buffer.
Parameters:
Name Type Description
bufferSize Uint8Array The buffer size
Source:

Classes

Buffer

Methods

clear()

Clear the buffer.
Source:

getCount() → {number}

Get the data count
Source:
Returns:
The data count
Type
number

getData() → {Uint8Array}

Get the data
Source:
Returns:
The data
Type
Uint8Array

getStartPos() → {number}

Get the start position
Source:
Returns:
The start position
Type
number

setData(data)

Set the data
Parameters:
Name Type Description
data Uint8Array The data
Source:

setStartPos(startPos)

Set the start position
Parameters:
Name Type Description
startPos number The start position
Source: