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
| Attribute | Type | Description |
|---|---|---|
| Reader | *bytes.Reader | An 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
| Type | Description |
|---|---|
error | An error if the close operation fails, otherwise nil. |