azure-core
Loading...
Searching...
No Matches
null_body_stream.hpp
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
9#pragma once
10
12
13namespace Azure { namespace Core { namespace IO { namespace _internal {
14
19 class NullBodyStream final : public BodyStream {
20 private:
21 size_t OnRead(uint8_t* buffer, size_t count, Azure::Core::Context const& context) override
22 {
23 (void)context;
24 (void)buffer;
25 (void)count;
26 return 0;
27 }
28
29 public:
31 explicit NullBodyStream() {}
32
33 int64_t Length() const override { return 0; }
34
35 void Rewind() override {}
36
41 static NullBodyStream* GetNullBodyStream();
42 };
43
44}}}} // namespace Azure::Core::IO::_internal
BodyStream is used to read data to/from a service.
A context is a node within a unidirectional tree that represents deadlines and key/value pairs.
Definition context.hpp:72
virtual int64_t Length() const =0
Get the length of the data.
virtual void Rewind()
Resets the stream back to the beginning (for retries).
Definition body_stream.hpp:64
Compute the hash value for the input binary data, using SHA256, SHA384 and SHA512.
Definition azure_assert.hpp:57