次の方法で共有


BlobUploadFromUrlOptions Class

  • java.lang.Object
    • com.azure.storage.blob.options.BlobUploadFromUrlOptions

public class BlobUploadFromUrlOptions

Extended options that may be passed when uploading a Block Blob from URL.

Constructor Summary

Constructor Description
BlobUploadFromUrlOptions(String sourceUrl)

Creates a new instance of BlobUploadFromUrlOptions.

Method Summary

Modifier and Type Method and Description
byte[] getContentMd5()

Gets the MD5 hash of the content.

BlobCopySourceTagsMode getCopySourceTagsMode()

Gets the copy source tags mode

BlobRequestConditions getDestinationRequestConditions()

Gets the BlobRequestConditions.

BlobHttpHeaders getHeaders()

Gets the BlobHttpHeaders.

HttpAuthorization getSourceAuthorization()

Gets "Authorization" header for accessing source URL.

BlobRequestConditions getSourceRequestConditions()

Gets the BlobRequestConditions.

String getSourceUrl()

Gets the source URL to upload from.

Map<String,String> getTags()

Gets the tags to associate with the blob.

AccessTier getTier()

Gets the AccessTier.

Boolean isCopySourceBlobProperties()

Optional, default is true.

BlobUploadFromUrlOptions setContentMd5(byte[] contentMd5)

Sets the MD5 hash of the content.

BlobUploadFromUrlOptions setCopySourceBlobProperties(Boolean copySourceBlobProperties)

Optional, default is true.

BlobUploadFromUrlOptions setCopySourceTagsMode(BlobCopySourceTagsMode copySourceTags)

Sets the copy source tags mode

BlobUploadFromUrlOptions setDestinationRequestConditions(BlobRequestConditions destinationRequestConditions)

Sets the BlobRequestConditions.

BlobUploadFromUrlOptions setHeaders(BlobHttpHeaders headers)

Sets the BlobHttpHeaders.

BlobUploadFromUrlOptions setSourceAuthorization(HttpAuthorization sourceAuthorization)

Sets "Authorization" header for accessing source URL.

BlobUploadFromUrlOptions setSourceRequestConditions(BlobRequestConditions sourceRequestConditions)

Sets the BlobRequestConditions.

BlobUploadFromUrlOptions setTags(Map<String,String> tags)

Sets the tags to associate with the blob.

BlobUploadFromUrlOptions setTier(AccessTier tier)

Sets the AccessTier.

Methods inherited from java.lang.Object

Constructor Details

BlobUploadFromUrlOptions

public BlobUploadFromUrlOptions(String sourceUrl)

Creates a new instance of BlobUploadFromUrlOptions.

Parameters:

sourceUrl - The source URL to upload from.

Method Details

getContentMd5

public byte[] getContentMd5()

Gets the MD5 hash of the content.

Returns:

An MD5 hash of the content. This hash is used to verify the integrity of the content during transport. When this header is specified, the storage service compares the hash of the content that has arrived with this header value. Note that this MD5 hash is not stored with the blob. If the two hashes do not match, the operation will fail.

getCopySourceTagsMode

public BlobCopySourceTagsMode getCopySourceTagsMode()

Gets the copy source tags mode

Returns:

The copy source tags mode.

getDestinationRequestConditions

public BlobRequestConditions getDestinationRequestConditions()

Gets the BlobRequestConditions.

Returns:

getHeaders

public BlobHttpHeaders getHeaders()

Gets the BlobHttpHeaders.

Returns:

getSourceAuthorization

public HttpAuthorization getSourceAuthorization()

Gets "Authorization" header for accessing source URL. Currently only "Bearer" authentication is accepted by Storage.

Returns:

auth header for access to source.

getSourceRequestConditions

public BlobRequestConditions getSourceRequestConditions()

Gets the BlobRequestConditions.

Returns:

getSourceUrl

public String getSourceUrl()

Gets the source URL to upload from.

Returns:

The source URL to upload from.

getTags

public Map getTags()

Gets the tags to associate with the blob.

Returns:

The tags to associate with the blob.

getTier

public AccessTier getTier()

Gets the AccessTier.

Returns:

isCopySourceBlobProperties

public Boolean isCopySourceBlobProperties()

Optional, default is true. Indicates if properties from the source blob should be copied.

Returns:

Whether properties from the source blob should be copied.

setContentMd5

public BlobUploadFromUrlOptions setContentMd5(byte[] contentMd5)

Sets the MD5 hash of the content.

Parameters:

contentMd5 - An MD5 hash of the block content. This hash is used to verify the integrity of the block during transport. When this header is specified, the storage service compares the hash of the content that has arrived with this header value. Note that this MD5 hash is not stored with the blob. If the two hashes do not match, the operation will fail.

Returns:

The updated options

setCopySourceBlobProperties

public BlobUploadFromUrlOptions setCopySourceBlobProperties(Boolean copySourceBlobProperties)

Optional, default is true. Indicates if properties from the source blob should be copied.

Parameters:

copySourceBlobProperties - Whether properties from the source blob should be copied.

Returns:

The updated options.

setCopySourceTagsMode

public BlobUploadFromUrlOptions setCopySourceTagsMode(BlobCopySourceTagsMode copySourceTags)

Sets the copy source tags mode

Parameters:

copySourceTags - Indicates if a legal hold should be placed on the blob.

Returns:

The updated options.

setDestinationRequestConditions

public BlobUploadFromUrlOptions setDestinationRequestConditions(BlobRequestConditions destinationRequestConditions)

Sets the BlobRequestConditions.

Parameters:

destinationRequestConditions - BlobRequestConditions

Returns:

The updated options.

setHeaders

public BlobUploadFromUrlOptions setHeaders(BlobHttpHeaders headers)

Sets the BlobHttpHeaders.

Parameters:

headers - BlobHttpHeaders

Returns:

The updated options

setSourceAuthorization

public BlobUploadFromUrlOptions setSourceAuthorization(HttpAuthorization sourceAuthorization)

Sets "Authorization" header for accessing source URL. Currently only "Bearer" authentication is accepted by Storage.

Parameters:

sourceAuthorization - auth header for access to source.

Returns:

The updated options.

setSourceRequestConditions

public BlobUploadFromUrlOptions setSourceRequestConditions(BlobRequestConditions sourceRequestConditions)

Sets the BlobRequestConditions.

Parameters:

sourceRequestConditions - BlobRequestConditions

Returns:

The updated options.

setTags

public BlobUploadFromUrlOptions setTags(Map tags)

Sets the tags to associate with the blob.

Parameters:

tags - The tags to associate with the blob.

Returns:

The updated options.

setTier

public BlobUploadFromUrlOptions setTier(AccessTier tier)

Sets the AccessTier.

Parameters:

tier - AccessTier

Returns:

The updated options.

Applies to