26StringStream(
const std::string &source) :
std::
iostream(&_buf) {
44 return _buf.get_data().size();
53 const vector_uchar &data = _buf.
get_data();
55 return std::string((
char *)&data[0], data.size());
67 set_data((
const unsigned char *)data.data(), data.size());
const vector_uchar & get_data() const
Returns a reference to the contents of the internal buffer, without any of the iostream buffer.
size_t get_data_size()
Returns the number of characters available to be read from the data stream.
get_data
Returns the contents of the data stream as a string.
void clear_data()
Empties the buffer.
set_data
Replaces the contents of the data stream.
void swap_data(vector_uchar &data)
Swaps the indicated buffer for the contents of the internal buffer.