diff options
author | Yi Jin <jinyithu@google.com> | 2017-11-16 15:32:27 -0800 |
---|---|---|
committer | Yi Jin <jinyithu@google.com> | 2017-11-16 15:32:27 -0800 |
commit | 0abdfb0889a4957faaba8a95903e529fced7316c (patch) | |
tree | 79310a183c151a542be3d609299f40c06f158238 /libs/protoutil/include | |
parent | e1c20603a4ddd0df58629c206debd947cf1a8e3a (diff) |
Expose how many bytes are written in ProtoOutputStream
Bug: 69428467
Test: N/A
Change-Id: If1405885949635cebd1c6d89e220c210ef9fa210
Diffstat (limited to 'libs/protoutil/include')
-rw-r--r-- | libs/protoutil/include/android/util/ProtoOutputStream.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/protoutil/include/android/util/ProtoOutputStream.h b/libs/protoutil/include/android/util/ProtoOutputStream.h index ce4184967026..faea9b21311d 100644 --- a/libs/protoutil/include/android/util/ProtoOutputStream.h +++ b/libs/protoutil/include/android/util/ProtoOutputStream.h @@ -110,6 +110,12 @@ public: void end(long long token); /** + * Returns how many bytes are buffered in ProtoOutputStream. + * Notice, this is not the actual(compact) size of the output data. + */ + size_t bytesWritten(); + + /** * Flushes the protobuf data out to given fd. When the following functions are called, * it is not able to write to ProtoOutputStream any more since the data is compact. */ |