Skip to main content

StreamingBuffer

This class provides a memory-based buffer that clears its contents upon being read. It extends the standard byte stream interface to support streaming workflows where data is consumed immediately after retrieval.

Constructor

Signature

def StreamingBuffer() - > null

Methods


read()

@classmethod
def read() - > bytes

Reads the entire content of the buffer, then clears the buffer and resets its position to the beginning.

Returns

TypeDescription
bytesThe complete byte sequence stored in the buffer prior to it being cleared.