Get the internal contents as bytes.
(self)
| 436 | return self.buffer.byte_buf.decode(encoding=self.encoding, errors=self.errors) |
| 437 | |
| 438 | def getbytes(self) -> bytes: |
| 439 | """Get the internal contents as bytes.""" |
| 440 | return bytes(self.buffer.byte_buf) |
| 441 | |
| 442 | def read(self, size: int | None = -1) -> str: |
| 443 | """Read from the internal contents as a str and then clear them out. |
no outgoing calls