|
|
azure-core
|
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. | |
| virtual void | Rewind () |
| Resets the stream back to the beginning (for retries). | |
| size_t | Read (uint8_t *buffer, size_t count, Azure::Core::Context const &context=Azure::Core::Context()) |
| Read portion of data into a buffer. | |
| 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. | |
| 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. | |
|
virtualdefault |
|
pure virtual |
Content-Length header. Implemented in Azure::Core::IO::MemoryBodyStream, Azure::Core::IO::FileBodyStream, and Azure::Core::IO::ProgressBodyStream.
|
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 Azure::Core::IO::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 > Azure::Core::IO::BodyStream::ReadToEnd | ( | Azure::Core::Context const & | context = Azure::Core::Context() | ) |
| context | A context to control the request lifetime. |
body.
|
inlinevirtual |
Reimplemented in Azure::Core::IO::MemoryBodyStream, Azure::Core::IO::FileBodyStream, and Azure::Core::IO::ProgressBodyStream.