|
A concrete implementation of Azure::Core::IO::BodyStream that wraps another stream and reports progress.
#include <body_stream.hpp>
Public Member Functions | |
ProgressBodyStream (BodyStream &bodyStream, std::function< void(int64_t bytesTransferred)> callback) | |
Constructs ProgressBodyStream from a BodyStream. More... | |
void | Rewind () override |
int64_t | Length () const override |
Get the length of the data. More... | |
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... | |
ProgressBodyStream::ProgressBodyStream | ( | BodyStream & | bodyStream, |
std::function< void(int64_t bytesTransferred)> | callback | ||
) |
bodyStream | The body stream to wrap. |
callback | The callback method used to report progress back to the caller. |
|
overridevirtual |
Content-Length
header. Implements Azure::Core::IO::BodyStream.