Show: Delphi C++
Display Preferences

Data.Cloud.AmazonAPI.TAmazonStorageService.GetObject

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetObject(const BucketName, ObjectName: string; OptionalParams: TAmazonGetObjectOptionals;  ObjectStream: TStream; ResponseInfo: TCloudResponseInfo = nil): Boolean; overload;
function GetObject(const BucketName, ObjectName: string;  ObjectStream: TStream; ResponseInfo: TCloudResponseInfo = nil): Boolean; overload;

C++

bool __fastcall GetObject(const System::UnicodeString BucketName, const System::UnicodeString ObjectName, const TAmazonGetObjectOptionals &OptionalParams, System::Classes::TStream* ObjectStream, Data::Cloud::Cloudapi::TCloudResponseInfo* ResponseInfo = (Data::Cloud::Cloudapi::TCloudResponseInfo*)(0x0))/* overload */;
bool __fastcall GetObject(const System::UnicodeString BucketName, const System::UnicodeString ObjectName, System::Classes::TStream* ObjectStream, Data::Cloud::Cloudapi::TCloudResponseInfo* ResponseInfo = (Data::Cloud::Cloudapi::TCloudResponseInfo*)(0x0))/* overload */;

Properties

Type Visibility Source Unit Parent
function public
Data.Cloud.AmazonAPI.pas
Data.Cloud.AmazonAPI.hpp
Data.Cloud.AmazonAPI TAmazonStorageService

Description

Writes the stream for the given object, or returns nil.

There are two GetObject overloaded methods. To control the request, use the first overloaded method with the OptionalParams parameter.

If the request fails on a 404 (File Not Found) error, then the requested object may have been deleted. If you provide a ResponseInfo instance, then you can check whether the object was deleted. To check this, verify that there is an 'x-amz-delete-marker' response header and its value is set to True.

The method returns the object stream or nil.

The following table shows the significance of the parameters:

Parameter Description

BucketName

The name of the bucket the object is in.

ObjectName

The name of the object to get.

OptionalParams

The optional parameters or headers to use in the request.

ObjectStream

The stream to write to. Must not be nil.

ResponseInfo

The optional class for storing response info into.

See Also

Personal tools
In Other Languages
Previous Versions
Assistance