|
A concrete implementation of Azure::Core::IO::BodyStream used for reading data from a file.
#include <body_stream.hpp>
Public Member Functions | |
FileBodyStream (const std::string &filename) | |
Constructs FileBodyStream from a file name. More... | |
~FileBodyStream () | |
Closes the file and cleans up any resources. 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... | |
FileBodyStream::FileBodyStream | ( | const std::string & | filename | ) |
filename | A reference to a file name string used to identify the file, which needs to have the necessary file path specified to locate the file. |
FileBodyStream::~FileBodyStream | ( | ) |
|
overridevirtual |
Content-Length
header. Implements Azure::Core::IO::BodyStream.