|
Used to read data to/from a service.
#include <body_stream.hpp>
Public Member Functions | |
virtual | ~BodyStream ()=default |
Destructs BodyStream . | |
virtual int64_t | Length () const =0 |
Get the length of the data. More... | |
virtual void | Rewind () |
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... | |
|
pure virtual |
Content-Length
header. Implemented in Azure::Core::IO::ProgressBodyStream, Azure::Core::IO::FileBodyStream, and Azure::Core::IO::MemoryBodyStream.
|
inline |
buffer | Pointer to a first byte of the byte buffer to read the data into. |
count | Size of the buffer to read the data into. |
context | A context to control the request lifetime. |
size_t BodyStream::ReadToCount | ( | uint8_t * | buffer, |
size_t | count, | ||
Azure::Core::Context const & | context = Azure::Core::Context() |
||
) |
buffer | Pointer to a first byte of the byte buffer to read the data into. |
count | Size of the buffer to read the data into. |
context | A context to control the request lifetime. |
std::vector< uint8_t > BodyStream::ReadToEnd | ( | Azure::Core::Context const & | context = Azure::Core::Context() | ) |
context | A context to control the request lifetime. |
body
.