io/BufferedOutputStream: allow specifying the buffer size

This commit is contained in:
Max Kellermann 2020-09-07 12:51:00 +02:00 committed by Max Kellermann
parent 9da28e5c73
commit d2f84f3df8

View File

@ -56,8 +56,9 @@ class BufferedOutputStream {
DynamicFifoBuffer<char> buffer;
public:
explicit BufferedOutputStream(OutputStream &_os) noexcept
:os(_os), buffer(32768) {}
explicit BufferedOutputStream(OutputStream &_os,
size_t buffer_size=32768) noexcept
:os(_os), buffer(buffer_size) {}
/**
* Write the contents of a buffer.