28#ifndef _chunkedostream_h
29#define _chunkedostream_h
65 throw std::out_of_range(
66 "A chunked_outbuf (or chunked_ostream) was built using a buffer larger than 0x00ffffff");
89 int_type
err_chunk(
const std::string &msg);
91 virtual std::streamsize
xsputn(
const char *s, std::streamsize num);
97 virtual int_type
sync();
A C++ stream class for chunked data. This class uses the chunked_outbuf class to provide for chunked ...
chunked_ostream(std::ostream &os, unsigned int buf_size)
int_type write_data_chunk()
Send the current contents of the buffer as a data chunk. Normally, the chunked_ostream object waits u...
int_type write_end_chunk()
Send an end chunk. Normally, an end chunk is sent by closing the chunked_ostream, but this method can...
int_type write_err_chunk(const std::string &msg)
Send an error message down the stream. When called, this method dumps all the data currently in the b...
output buffer for a chunked stream This performs buffered output encoding the data in the stream usin...
virtual std::streamsize xsputn(const char *s, std::streamsize num)
Write bytes to the chunked stream Write the bytes in s to the chunked stream.
int_type end_chunk()
Send an end chunk.
int_type data_chunk()
Write out the contents of the buffer as a chunk.
virtual ~chunked_outbuf()
chunked_outbuf(std::ostream &os, unsigned int buf_size)
int_type err_chunk(const std::string &msg)
Send an error chunk While building up the next chunk, send an error chunk, ignoring the data currentl...
virtual int_type sync()
Synchronize the stream with its data sink.
virtual int_type overflow(int c)
Virtual method called when the internal buffer would overflow. When the internal buffer fills,...
friend class chunked_ostream
top level DAP object to house generic methods
bool is_host_big_endian()
Does this host use big-endian byte order?