Class implementing interface similar to ostringstream, but to construct ndn::Buffer. More...
#include <buffer-stream.hpp>
Public Member Functions | |
OBufferStream () | |
Default constructor. More... | |
shared_ptr< Buffer > | buf () |
Flush written data to the stream and return shared pointer to the underlying buffer. More... | |
Class implementing interface similar to ostringstream, but to construct ndn::Buffer.
The benefit of using stream interface is that it provides automatic buffering of written data and eliminates (or reduces) overhead of resizing the underlying buffer when writing small pieces of data.
Usage example:
Definition at line 79 of file buffer-stream.hpp.
|
inline |
Default constructor.
Definition at line 85 of file buffer-stream.hpp.
|
inline |
Flush written data to the stream and return shared pointer to the underlying buffer.
Definition at line 96 of file buffer-stream.hpp.
Referenced by ndn::Certificate::encode(), ndn::Block::encode(), ndn::SecTpm::exportPrivateKeyPkcs5FromTpm(), ndn::SecTpmFile::exportPrivateKeyPkcs8FromTpm(), ndn::fromHex(), ndn::SecTpm::importPrivateKeyPkcs5IntoTpm(), ndn::crypto::sha256(), and ndn::SecTpmFile::signInTpm().