|
byteme
Read/write bytes from various sources
|
Virtual class for writing bytes to a sink. More...
#include <Writer.hpp>

Public Member Functions | |
| virtual | ~Writer ()=default |
| virtual void | write (const unsigned char *buffer, std::size_t n)=0 |
| virtual void | finish ()=0 |
Virtual class for writing bytes to a sink.
|
virtualdefault |
The destructor should have the same effect as finish() if the latter was not previously called.
|
pure virtual |
Indicate that the writing has finished and that the relevant clean-up (buffer flushing, file closing, etc.) should be performed. This should be called exactly once, after which no further calls to write() or finish() should be performed.
Implemented in byteme::GzipFileWriter, byteme::OstreamWriter< Pointer_ >, byteme::RawBufferWriter, byteme::RawFileWriter, and byteme::ZlibBufferWriter.
|
pure virtual |
Write the next chunk of bytes to the output sink. This may or may not be internally buffered at the discretion of the concrete class.
| [in] | buffer | Pointer to the start of an array containing the bytes to be written. |
| n | Length of the array in buffer. This may be zero. |
Implemented in byteme::GzipFileWriter, byteme::OstreamWriter< Pointer_ >, byteme::RawBufferWriter, byteme::RawFileWriter, and byteme::ZlibBufferWriter.