Wrapper that buffers writes to an underlying stream. Requires underlying stream to support write_buffer() method for efficient buffer flushing and obfuscation.

Synopsis

Declared in <streams.h>

template<typename S>
class BufferedWriter;

Member Functions

Name

Description

BufferedWriter [constructor]

Construct a writer over the given destination stream with an internal buffer of size bytes.

~BufferedWriter [destructor]

Flush any buffered bytes, then destroy the writer.

flush

Write any buffered bytes to the destination stream and reset the buffer.

write

Buffer bytes from src, flushing to the destination whenever the buffer fills.

operator<<

Serialize an object through the buffered writer and return this writer.

Created with MrDocs