diff options
Diffstat (limited to 'cpp/src/qpid/framing/AMQContentBody.cpp')
| -rw-r--r-- | cpp/src/qpid/framing/AMQContentBody.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cpp/src/qpid/framing/AMQContentBody.cpp b/cpp/src/qpid/framing/AMQContentBody.cpp index 59f3619ef2..72f7d9978e 100644 --- a/cpp/src/qpid/framing/AMQContentBody.cpp +++ b/cpp/src/qpid/framing/AMQContentBody.cpp @@ -18,7 +18,7 @@ * under the License. * */ -#include "AMQContentBody.h" +#include "qpid/framing/AMQContentBody.h" #include <iostream> qpid::framing::AMQContentBody::AMQContentBody(){ @@ -27,7 +27,7 @@ qpid::framing::AMQContentBody::AMQContentBody(){ qpid::framing::AMQContentBody::AMQContentBody(const string& _data) : data(_data){ } -uint32_t qpid::framing::AMQContentBody::size() const{ +uint32_t qpid::framing::AMQContentBody::encodedSize() const{ return data.size(); } void qpid::framing::AMQContentBody::encode(Buffer& buffer) const{ @@ -39,6 +39,8 @@ void qpid::framing::AMQContentBody::decode(Buffer& buffer, uint32_t _size){ void qpid::framing::AMQContentBody::print(std::ostream& out) const { - out << "content (" << size() << " bytes)"; - out << " " << data.substr(0,16) << "..."; + out << "content (" << encodedSize() << " bytes)"; + const size_t max = 32; + out << " " << data.substr(0, max); + if (data.size() > max) out << "..."; } |
