次の方法で共有


BlockBlobSimpleUploadOptions Class

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

public class BlockBlobSimpleUploadOptions

Extended options that may be passed when uploading a Block Blob in a single request.

Constructor Summary

Constructor Description
BlockBlobSimpleUploadOptions(BinaryData data)

Creates a new instance of BlockBlobSimpleUploadOptions.

BlockBlobSimpleUploadOptions(InputStream data, long length)

Creates a new instance of BlockBlobSimpleUploadOptions.

BlockBlobSimpleUploadOptions(Flux<ByteBuffer> data, long length)

Creates a new instance of BlockBlobSimpleUploadOptions.

Method Summary

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

Gets the MD5 hash of the content.

BinaryData getData()

Gets the data to write to the blob.

Flux<ByteBuffer> getDataFlux()

Gets the data to write to the blob.

InputStream getDataStream()

Gets the data to write to the blob.

BlobHttpHeaders getHeaders()

Gets the BlobHttpHeaders.

BlobImmutabilityPolicy getImmutabilityPolicy()

Gets the BlobImmutabilityPolicy.

long getLength()

Gets the exact length of the data.

Map<String,String> getMetadata()

Gets the metadata to associate with the blob.

BlobRequestConditions getRequestConditions()

Gets the BlobRequestConditions.

Map<String,String> getTags()

Gets the tags to associate with the blob.

AccessTier getTier()

Gets the AccessTier.

Boolean isLegalHold()

Gets if a legal hold should be placed on the blob.

BlockBlobSimpleUploadOptions setContentMd5(byte[] contentMd5)

Sets the MD5 hash of the content.

BlockBlobSimpleUploadOptions setHeaders(BlobHttpHeaders headers)

Sets the BlobHttpHeaders.

BlockBlobSimpleUploadOptions setImmutabilityPolicy(BlobImmutabilityPolicy immutabilityPolicy)

Sets the BlobImmutabilityPolicy.

BlockBlobSimpleUploadOptions setLegalHold(Boolean legalHold)

Sets if a legal hold should be placed on the blob.

BlockBlobSimpleUploadOptions setMetadata(Map<String,String> metadata)

Sets the metadata to associate with the blob.

BlockBlobSimpleUploadOptions setRequestConditions(BlobRequestConditions requestConditions)

Sets the BlobRequestConditions.

BlockBlobSimpleUploadOptions setTags(Map<String,String> tags)

Sets the tags to associate with the blob.

BlockBlobSimpleUploadOptions setTier(AccessTier tier)

Sets the AccessTier.

Methods inherited from java.lang.Object

Constructor Details

BlockBlobSimpleUploadOptions

public BlockBlobSimpleUploadOptions(BinaryData data)

Creates a new instance of BlockBlobSimpleUploadOptions.

Parameters:

data - The data to write to the block. Note that this BinaryData must have defined length and must be replayable if retries are enabled (the default), see BinaryData#isReplayable().

BlockBlobSimpleUploadOptions

public BlockBlobSimpleUploadOptions(InputStream data, long length)

Creates a new instance of BlockBlobSimpleUploadOptions.

Parameters:

data - The data to write to the blob.
length - The exact length of the data. It is important that this value match precisely the length of the data emitted by the data source.

BlockBlobSimpleUploadOptions

public BlockBlobSimpleUploadOptions(Flux data, long length)

Creates a new instance of BlockBlobSimpleUploadOptions.

Parameters:

data - The data to write to the blob. Note that this Flux must be replayable if retries are enabled (the default). In other words, the Flux must produce the same data each time it is subscribed to.
length - The exact length of the data. It is important that this value match precisely the length of the data emitted by the data source.

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.

getData

public BinaryData getData()

Gets the data to write to the blob.

Returns:

The data to write to the blob.

getDataFlux

public Flux getDataFlux()

Gets the data to write to the blob.

Returns:

The data to write to the blob. Note that this Flux must be replayable if retries are enabled (the default). In other words, the Flux must produce the same data each time it is subscribed to.

getDataStream

public InputStream getDataStream()

Gets the data to write to the blob.

Returns:

The data to write to the blob.

getHeaders

public BlobHttpHeaders getHeaders()

Gets the BlobHttpHeaders.

Returns:

getImmutabilityPolicy

public BlobImmutabilityPolicy getImmutabilityPolicy()

Gets the BlobImmutabilityPolicy.

Returns:

getLength

public long getLength()

Gets the exact length of the data.

Returns:

The exact length of the data. It is important that this value match precisely the length of the data emitted by the data source.

getMetadata

public Map getMetadata()

Gets the metadata to associate with the blob.

Returns:

The metadata to associate with the blob.

getRequestConditions

public BlobRequestConditions getRequestConditions()

Gets the BlobRequestConditions.

Returns:

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:

isLegalHold

public Boolean isLegalHold()

Gets if a legal hold should be placed on the blob.

Returns:

If a legal hold should be placed on the blob.

setContentMd5

public BlockBlobSimpleUploadOptions 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

setHeaders

public BlockBlobSimpleUploadOptions setHeaders(BlobHttpHeaders headers)

Sets the BlobHttpHeaders.

Parameters:

headers - BlobHttpHeaders

Returns:

The updated options

setImmutabilityPolicy

public BlockBlobSimpleUploadOptions setImmutabilityPolicy(BlobImmutabilityPolicy immutabilityPolicy)

Sets the BlobImmutabilityPolicy.

Note that this parameter is only applicable to a blob within a container that has immutable storage with versioning enabled.

Parameters:

immutabilityPolicy - BlobImmutabilityPolicy

Returns:

The updated options.

setLegalHold

public BlockBlobSimpleUploadOptions setLegalHold(Boolean legalHold)

Sets if a legal hold should be placed on the blob.

Note that this parameter is only applicable to a blob within a container that has immutable storage with versioning enabled.

Parameters:

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

Returns:

The updated options.

setMetadata

public BlockBlobSimpleUploadOptions setMetadata(Map metadata)

Sets the metadata to associate with the blob.

Parameters:

metadata - The metadata to associate with the blob.

Returns:

The updated options

setRequestConditions

public BlockBlobSimpleUploadOptions setRequestConditions(BlobRequestConditions requestConditions)

Sets the BlobRequestConditions.

Parameters:

requestConditions - BlobRequestConditions

Returns:

The updated options.

setTags

public BlockBlobSimpleUploadOptions 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 BlockBlobSimpleUploadOptions setTier(AccessTier tier)

Sets the AccessTier.

Parameters:

tier - AccessTier

Returns:

The updated options.

Applies to