Read from the internal contents as bytes and then clear them out.
(self)
| 454 | return result |
| 455 | |
| 456 | def readbytes(self) -> bytes: |
| 457 | """Read from the internal contents as bytes and then clear them out.""" |
| 458 | result = self.getbytes() |
| 459 | self.clear() |
| 460 | return result |
| 461 | |
| 462 | def clear(self) -> None: |
| 463 | """Clear the internal contents.""" |