|
Azure::Core::IO::BodyStream providing data from an initialized memory buffer.
#include <body_stream.hpp>
Public Member Functions | |
MemoryBodyStream (std::vector< uint8_t > const &&)=delete | |
MemoryBodyStream (std::vector< uint8_t > const &buffer) | |
Construct using vector of bytes. More... | |
MemoryBodyStream (const uint8_t *data, size_t length) | |
Construct using buffer pointer and its size. More... | |
int64_t | Length () const override |
Get the length of the data. More... | |
void | Rewind () override |
Public Member Functions inherited from Azure::Core::IO::BodyStream | |
virtual | ~BodyStream ()=default |
Destructs BodyStream . More... | |
size_t | Read (uint8_t *buffer, size_t count, Azure::Core::Context const &context=Azure::Core::Context()) |
Read portion of data into a buffer. More... | |
size_t | ReadToCount (uint8_t *buffer, size_t count, Azure::Core::Context const &context=Azure::Core::Context()) |
Read Azure::Core::IO::BodyStream into a buffer until the buffer is filled, or until the stream is read to end. More... | |
std::vector< uint8_t > | ReadToEnd (Azure::Core::Context const &context=Azure::Core::Context()) |
Read Azure::Core::IO::BodyStream until the stream is read to end, allocating memory for the entirety of contents. More... | |
|
inline |
buffer | Vector of bytes with the contents to provide the data from to the readers. |
|
inlineexplicit |
data | Pointer to a first byte of the buffer with the contents to provide the data from to the readers. |
length | Size of the buffer. |
|
inlineoverridevirtual |
Content-Length
header. Implements Azure::Core::IO::BodyStream.