Get bytes from the media. Args: begin: int, offset from beginning of file. length: int, number of bytes to read, starting at begin. Returns: A string of bytes read. May be shorted than length if EOF was reached first.
(self, begin, length)
| 510 | return self._resumable |
| 511 | |
| 512 | def getbytes(self, begin, length): |
| 513 | """Get bytes from the media. |
| 514 | |
| 515 | Args: |
| 516 | begin: int, offset from beginning of file. |
| 517 | length: int, number of bytes to read, starting at begin. |
| 518 | |
| 519 | Returns: |
| 520 | A string of bytes read. May be shorted than length if EOF was reached |
| 521 | first. |
| 522 | """ |
| 523 | self._fd.seek(begin) |
| 524 | return self._fd.read(length) |
| 525 | |
| 526 | def has_stream(self): |
| 527 | """Does the underlying upload support a streaming interface. |