CatapultServer
v0.5.0.1 (Elephant)
|
Provides a buffered output stream around raw file. More...
Public Member Functions | |
BufferedOutputFileStream (RawFile &&rawFile, size_t bufferSize=Default_Stream_Buffer_Size) | |
Creates a buffered output stream around rawFile with an optional internal buffer size (bufferSize). More... | |
void | write (const RawBuffer &buffer) override |
void | flush () override |
Public Member Functions inherited from catapult::io::OutputStream | |
virtual | ~OutputStream ()=default |
Private Attributes | |
RawFile | m_rawFile |
std::vector< uint8_t > | m_buffer |
size_t | m_bufferPosition |
Provides a buffered output stream around raw file.
catapult::io::BufferedOutputFileStream::BufferedOutputFileStream | ( | RawFile && | rawFile, |
size_t | bufferSize = Default_Stream_Buffer_Size |
||
) |
Creates a buffered output stream around rawFile with an optional internal buffer size (bufferSize).
|
overridevirtual |
Commits all pending data.
catapult_file_io_error | if flush failed. |
Implements catapult::io::OutputStream.
|
overridevirtual |
Writes data pointed to by buffer to this stream.
catapult_file_io_error | if proper amount of data could not be written. |
Implements catapult::io::OutputStream.
|
private |
|
private |
|
private |