Buffered output stream.
More...
#include <base/io/BufferedOutputStream.h>
Inherits FilterOutputStream.
Inherited by FormatOutputStream.
Buffered output stream.
A FilterOutputStream that adds buffer functionality to an OutputStream for added performance. MT-unsafe implementation.
- Version
- 1.0
◆ BufferedOutputStream()
Initializes the buffered output stream.
- Parameters
-
out | The output stream. |
size | The size of the buffer. Default is given by DEFAULT_BUFFER_SIZE. |
◆ ~BufferedOutputStream()
BufferedOutputStream::~BufferedOutputStream |
( |
| ) |
|
Flushes the buffer and releases any resources used by the output stream.
◆ flush()
void BufferedOutputStream::flush |
( |
| ) |
|
|
virtual |
◆ unfoldValue()
void BufferedOutputStream::unfoldValue |
( |
char |
value, |
|
|
unsigned int |
count |
|
) |
| |
Writes a single value multiple times to the stream.
- Parameters
-
value | The value to be written. |
count | The number of bytes to be written. |
◆ write()
unsigned int BufferedOutputStream::write |
( |
const uint8 * |
buffer, |
|
|
unsigned int |
size, |
|
|
bool |
nonblocking = false |
|
) |
| |
|
virtual |
Writes bytes in the specified buffer to stream.
- Parameters
-
buffer | The buffer containing the bytes to be written. |
size | The number of bytes to be written. |
nonblocking | Specifies that the method may not block. |
- Returns
- The actual number of bytes written. Always the requested number of bytes in blocking mode unless an error occured.
Implements OutputStream.
◆ buffer
Allocator<uint8> BufferedOutputStream::buffer |
|
protected |
◆ DEFAULT_BUFFER_SIZE
const unsigned int BufferedOutputStream::DEFAULT_BUFFER_SIZE = 4096 |
|
static |
The default size of the buffer.
◆ MINIMUM_BUFFER_SIZE
const unsigned int BufferedOutputStream::MINIMUM_BUFFER_SIZE = 1024 |
|
static |
◆ readHead
unsigned int BufferedOutputStream::readHead = 0 |
|
protected |
◆ writeHead
unsigned int BufferedOutputStream::writeHead = 0 |
|
protected |