18 StringStream() : std::iostream(&_buf) {
26 StringStream(
const std::string &source) : std::iostream(&_buf) {
50 INLINE std::string StringStream::
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());
void clear()
Empties the buffer.
set_data
Replaces the contents of the data stream.
const vector_uchar & get_data() const
Returns a reference to the contents of the internal buffer, without any of the iostream buffer.
void clear_data()
Empties the buffer.
size_t get_data_size()
Returns the number of characters available to be read from the data stream.
void swap_data(vector_uchar &data)
Swaps the indicated buffer for the contents of the internal buffer.
void swap_data(vector_uchar &data)
Swaps the indicated buffer for the contents of the internal buffer.