Formats the contents of this :class:`Data` object in a human readable way. :return: A Formatted string containing contents of this :class:`Data` object. :raise: :exc:`DataException` if there is a Proton error.
(self)
| 1385 | self._check(pn_data_copy(self._data, src._data)) |
| 1386 | |
| 1387 | def format(self) -> str: |
| 1388 | """ |
| 1389 | Formats the contents of this :class:`Data` object in a human readable way. |
| 1390 | |
| 1391 | :return: A Formatted string containing contents of this :class:`Data` object. |
| 1392 | :raise: :exc:`DataException` if there is a Proton error. |
| 1393 | """ |
| 1394 | sz = 16 |
| 1395 | while True: |
| 1396 | err, result = pn_data_format(self._data, sz) |
| 1397 | if err == PN_OVERFLOW: |
| 1398 | sz *= 2 |
| 1399 | continue |
| 1400 | else: |
| 1401 | self._check(err) |
| 1402 | return result |
| 1403 | |
| 1404 | def dump(self) -> None: |
| 1405 | """ |