Skip to main content

BytesReadCloser

This class provides a closeable reader for bytes, mimicking a stream from in-memory byte storage. It embeds a bytes.Reader to provide read functionality.

Attributes

AttributeTypeDescription
Reader*bytes.ReaderAn embedded bytes.Reader that provides the core functionality for reading bytes from an in-memory byte storage, allowing BytesReadCloser to mimic a stream.

Methods


Close()

@classmethod
def Close() - > error

Closes the BytesReadCloser, releasing any resources associated with it. This method is part of the io.Closer interface.

Returns

TypeDescription
errorAn error if the close operation fails, otherwise nil.