(self)
| 580 | return out_size |
| 581 | |
| 582 | def readall(self) -> bytes: |
| 583 | if self.is_exhausted: |
| 584 | self.on_exhausted() |
| 585 | return b"" |
| 586 | |
| 587 | out = bytearray() |
| 588 | |
| 589 | # The parent implementation uses "while True", which results in an extra read. |
| 590 | while not self.is_exhausted: |
| 591 | data = self.read(1024 * 64) |
| 592 | |
| 593 | # Stream may return empty before a max limit is reached. |
| 594 | if not data: |
| 595 | break |
| 596 | |
| 597 | out.extend(data) |
| 598 | |
| 599 | return bytes(out) |
| 600 | |
| 601 | def tell(self) -> int: |
| 602 | """Return the current stream position. |
no test coverage detected