CatapultServer
v0.5.0.1 (Elephant)
|
Memory-based implementation of input and output stream. More...
Public Member Functions | |
MemoryStream (std::vector< uint8_t > &buffer) | |
Creates a memory stream around buffer. More... | |
void | write (const RawBuffer &buffer) override |
void | flush () override |
Public Member Functions inherited from catapult::io::BufferInputStreamAdapter< std::vector< uint8_t > > | |
BufferInputStreamAdapter (const std::vector< uint8_t > &input) | |
Creates an input stream around input. More... | |
size_t | position () const |
Returns read position. More... | |
bool | eof () const override |
Returns true if no data is left in the stream. More... | |
void | read (const MutableRawBuffer &buffer) override |
Public Member Functions inherited from catapult::io::InputStream | |
virtual | ~InputStream ()=default |
Public Member Functions inherited from catapult::io::OutputStream | |
virtual | ~OutputStream ()=default |
Private Attributes | |
std::vector< uint8_t > & | m_buffer |
Memory-based implementation of input and output stream.
|
explicit |
Creates a memory stream around buffer.
|
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 |