|
byteme
Read/write bytes from various sources
|
Read bytes from a raw buffer, usually text. More...
#include <RawBufferReader.hpp>


Public Member Functions | |
| RawBufferReader (const unsigned char *buffer, std::size_t length) | |
| std::size_t | read (unsigned char *buffer, std::size_t n) |
Public Member Functions inherited from byteme::Reader | |
Read bytes from a raw buffer, usually text.
This is a wrapper around an input buffer, provided for consistency with the other *Reader classes.
|
inline |
| [in] | buffer | Pointer to an array of bytes. We assume that the lifetime of the array exceeds the lifetime of this RawBufferReader instance. |
| length | Length of the buffer. |
|
inlinevirtual |
Read the specified number of bytes from the source into a user-supplied buffer.
| [out] | buffer | Pointer to an array of at least length n. |
| n | Maximum number of bytes to extract from the source. This may be zero. |
n. If less than n, the stream of bytes from the source is finished and no more calls to read() should be performed. Implements byteme::Reader.