Creates an instance of PooledBuffer with given capacity. Internal buffers are allocated but contains no data. Users may call the PooledBuffer.fill method to fill this pooled buffer with data.
Total capacity of the internal buffers
Creates an instance of PooledBuffer with given capacity. Internal buffers are allocated and filled with data in the input buffers serially with respect to the total length.
Total capacity of the internal buffers
Input buffers containing the data to be filled in the pooled buffer
Total length of the data to be filled in.
The size of the data contained in the pooled buffers.
Fill the internal buffers with data in the input buffers serially with respect to the total length and the total capacity of the internal buffers. Data copied will be shift out of the input buffers.
Input buffers containing the data to be filled in the pooled buffer
Total length of the data to be filled in.
Get the readable stream assembled from all the data in the internal buffers.
Generated using TypeDoc
This class provides a buffer container which conceptually has no hard size limit. It accepts a capacity, an array of input buffers and the total length of input data. It will allocate an internal "buffer" of the capacity and fill the data in the input buffers into the internal "buffer" serially with respect to the total length. Then by calling PooledBuffer.getReadableStream(), you can get a readable stream assembled from all the data in the internal "buffer".