DSAzure.TAzureBlobService.GetBlob
Delphi
function GetBlob(const ContainerName: String; const BlobName: String; ResponseContent: TStream; const Snapshot: String = ''; StartByte: int64 = 0; EndByte: int64 = 0; const LeaseId: String = ''; GetMD5: boolean = false): boolean;
C++
bool __fastcall GetBlob(const System::UnicodeString ContainerName, const System::UnicodeString BlobName, System::Classes::TStream* ResponseContent, const System::UnicodeString Snapshot = System::UnicodeString(), __int64 StartByte = 0LL, __int64 EndByte = 0LL, const System::UnicodeString LeaseId = System::UnicodeString(), bool GetMD5 = false);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | DSAzure.pas DSAzure.hpp |
DSAzure | TAzureBlobService |
Description
Downloads the given blob, writing its content into the provided stream.
GetBlob populates the BlobStream
TStream with the content of the blob.
You can optionally specify StartByte
and EndByte
to refine the part of the content returned.
If a byte-range is specified and GetMD5
is set to True, then the returned result is the MD5 hash of that range of bytes, the provided range is not too long.
Besides, there are 4 overloaded 'GetBlob methods:
- The first GetBlob method downloads the given blob, writing its content into the provided stream.
- The second overloaded method also returns the blob's properties and metadata.
- Using the third overloaded method, you can request only a range of the blob to be returned by specifying values for
StartByte
andEndByte
. If you specify a range, you can also setGetAsHash
to True, which returns the MD5 hash of the range's content, instead of the content itself.
- Note: You can only return the hash for a range, and not the full content.
- The fourth overloaded method also returns the blob's properties and metadata. You can request only a range of the blob to be returned by specifying values for
StartByte
andEndByte
, similarly to the third overloaded method.
Parameter | Description |
---|---|
|
The name of the container the blob is in. |
|
The name of the blob to download. |
|
The stream to write the blob content into. |
|
The starting byte index. |
|
The ending byte index, or 0 if you do not want a range of the blob. |
|
If True or if |
|
The blob's property name/value pairs. |
|
The blob's metadata name/value pairs. |
|
The lease ID, required if the blob is locked. |
|
The optional class for storing response info into. |
The method returns True if the task was successful, False otherwise.