Class BlockBlobStageBlockOptions
java.lang.Object
com.azure.storage.blob.options.BlockBlobStageBlockOptions
- All Implemented Interfaces:
com.azure.storage.common.ValidatableContent
public final class BlockBlobStageBlockOptions
extends Object
implements com.azure.storage.common.ValidatableContent
Extended options that may be passed when staging a block.
-
Constructor Summary
ConstructorsConstructorDescriptionBlockBlobStageBlockOptions(String base64BlockId, com.azure.core.util.BinaryData data) Creates a new instance ofBlockBlobStageBlockOptions. -
Method Summary
Modifier and TypeMethodDescriptionGets the block ID to assign the new block.byte[]Gets the MD5 of the block content.com.azure.storage.common.ContentValidationAlgorithmGets the algorithm to use for transfer content validation on the request.com.azure.core.util.BinaryDatagetData()Gets the data to write to the blob.Gets the lease ID for accessing source content.setContentMd5(byte[] contentMd5) Sets the MD5 of the block content.setContentValidationAlgorithm(com.azure.storage.common.ContentValidationAlgorithm contentValidationAlgorithm) Sets the algorithm to use for transfer content validation on the request.setLeaseId(String leaseId) Sets the lease ID for accessing source content.
-
Constructor Details
-
BlockBlobStageBlockOptions
Creates a new instance ofBlockBlobStageBlockOptions.- Parameters:
base64BlockId- The block ID to assign the new block.data- The data to write to the block. Note that thisBinaryDatamust have defined length and must be replayable if retries are enabled (the default), seeBinaryData.isReplayable().- Throws:
NullPointerException- Ifbase64BlockIdordatais null.
-
-
Method Details
-
getBase64BlockId
Gets the block ID to assign the new block.- Returns:
- The block ID to assign the new block.
-
getData
public com.azure.core.util.BinaryData getData()Gets the data to write to the blob.- Returns:
- The data to write to the blob.
-
getLeaseId
Gets the lease ID for accessing source content.- Returns:
- Lease ID for accessing source content.
-
setLeaseId
Sets the lease ID for accessing source content.- Parameters:
leaseId- Lease ID for accessing source content.- Returns:
- The updated options.
-
getContentMd5
public byte[] getContentMd5()Gets the MD5 of the block 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.
-
setContentMd5
Sets the MD5 of the block 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
-
getContentValidationAlgorithm
public com.azure.storage.common.ContentValidationAlgorithm getContentValidationAlgorithm()Gets the algorithm to use for transfer content validation on the request. SeeContentValidationAlgorithmfor more details.- Specified by:
getContentValidationAlgorithmin interfacecom.azure.storage.common.ValidatableContent- Returns:
- The transfer validation checksum algorithm.
-
setContentValidationAlgorithm
public BlockBlobStageBlockOptions setContentValidationAlgorithm(com.azure.storage.common.ContentValidationAlgorithm contentValidationAlgorithm) Sets the algorithm to use for transfer content validation on the request. SeeContentValidationAlgorithmfor more details.- Specified by:
setContentValidationAlgorithmin interfacecom.azure.storage.common.ValidatableContent- Parameters:
contentValidationAlgorithm- The transfer validation checksum algorithm.- Returns:
- The updated options.
-