[#BufferedWriter]
= BufferedWriter
:mrdocs:

Wrapper that buffers writes to an underlying stream&period; Requires underlying stream to support write&lowbar;buffer() method for efficient buffer flushing and obfuscation&period;

== Synopsis

Declared in `&lt;streams&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename S&gt;
class BufferedWriter;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BufferedWriter/2constructor.adoc[`BufferedWriter`]         [.small]#[constructor]#
| Construct a writer over the given destination stream with an internal buffer of `size` bytes&period;
| xref:BufferedWriter/2destructor.adoc[`&#126;BufferedWriter`] [.small]#[destructor]#
| Flush any buffered bytes, then destroy the writer&period;
| xref:BufferedWriter/flush.adoc[`flush`] 
| Write any buffered bytes to the destination stream and reset the buffer&period;
| xref:BufferedWriter/write.adoc[`write`] 
| Buffer bytes from `src`, flushing to the destination whenever the buffer fills&period;
| xref:BufferedWriter/operator_lshift.adoc[`operator&lt;&lt;`] 
| Serialize an object through the buffered writer and return this writer&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
