diff options
Diffstat (limited to 'src/google/protobuf/message.h')
-rw-r--r-- | src/google/protobuf/message.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/google/protobuf/message.h b/src/google/protobuf/message.h index d96fcc60..0674a12c 100644 --- a/src/google/protobuf/message.h +++ b/src/google/protobuf/message.h @@ -232,6 +232,14 @@ class LIBPROTOBUF_EXPORT Message { // Like ParseFromZeroCopyStream(), but accepts messages that are missing // required fields. bool ParsePartialFromZeroCopyStream(io::ZeroCopyInputStream* input); + // Read a protocol buffer from the given zero-copy input stream, expecting + // the message to be exactly "size" bytes long. If successful, exactly + // this many bytes will have been consumed from the input. + bool ParseFromBoundedZeroCopyStream(io::ZeroCopyInputStream* input, int size); + // Like ParseFromBoundedZeroCopyStream(), but accepts messages that are + // missing required fields. + bool ParsePartialFromBoundedZeroCopyStream(io::ZeroCopyInputStream* input, + int size); // Parse a protocol buffer contained in a string. bool ParseFromString(const string& data); // Like ParseFromString(), but accepts messages that are missing |