Class AppendBlobAppendBlockOptions
java.lang.Object
com.azure.storage.blob.options.AppendBlobAppendBlockOptions
- All Implemented Interfaces:
com.azure.storage.common.ValidatableContent
public final class AppendBlobAppendBlockOptions
extends Object
implements com.azure.storage.common.ValidatableContent
Extended options that may be passed when appending a block to an append blob.
-
Constructor Summary
ConstructorsConstructorDescriptionAppendBlobAppendBlockOptions(com.azure.core.util.BinaryData data) Creates a new instance ofAppendBlobAppendBlockOptions. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Gets the MD5 hash of the block content.com.azure.storage.common.ContentValidationAlgorithmGets the algorithm to use for transfer content validation.com.azure.core.util.BinaryDatagetData()Gets the data to write to the blob.Gets theAppendBlobRequestConditions.setContentMd5(byte[] contentMd5) Sets the MD5 hash of the block content for transactional verification.setContentValidationAlgorithm(com.azure.storage.common.ContentValidationAlgorithm contentValidationAlgorithm) Sets the algorithm to use for transfer content validation.setRequestConditions(AppendBlobRequestConditions requestConditions) Sets theAppendBlobRequestConditions.
-
Constructor Details
-
AppendBlobAppendBlockOptions
public AppendBlobAppendBlockOptions(com.azure.core.util.BinaryData data) Creates a new instance ofAppendBlobAppendBlockOptions.- Parameters:
data- The data to write to the blob. Note that thisBinaryDatamust have defined length and must be replayable if retries are enabled (the default), seeBinaryData.isReplayable().- Throws:
NullPointerException- Ifdatais null or does not have a defined length.
-
-
Method Details
-
getData
public com.azure.core.util.BinaryData getData()Gets the data to write to the blob.- Returns:
- The data to write to the blob.
-
getContentMd5
public byte[] getContentMd5()Gets the MD5 hash of the block content.- Returns:
- An MD5 hash of the content, or null.
-
setContentMd5
Sets the MD5 hash of the block content for transactional verification.- Parameters:
contentMd5- An MD5 hash of the block content.- Returns:
- The updated options.
-
getRequestConditions
Gets theAppendBlobRequestConditions.- Returns:
- The request conditions.
-
setRequestConditions
public AppendBlobAppendBlockOptions setRequestConditions(AppendBlobRequestConditions requestConditions) Sets theAppendBlobRequestConditions.- Parameters:
requestConditions- The request conditions.- Returns:
- The updated options.
-
getContentValidationAlgorithm
public com.azure.storage.common.ContentValidationAlgorithm getContentValidationAlgorithm()Gets the algorithm to use for transfer content validation. SeeContentValidationAlgorithmfor more details.- Specified by:
getContentValidationAlgorithmin interfacecom.azure.storage.common.ValidatableContent- Returns:
- The transfer validation checksum algorithm.
-
setContentValidationAlgorithm
public AppendBlobAppendBlockOptions setContentValidationAlgorithm(com.azure.storage.common.ContentValidationAlgorithm contentValidationAlgorithm) Sets the algorithm to use for transfer content validation. SeeContentValidationAlgorithmfor more details.- Specified by:
setContentValidationAlgorithmin interfacecom.azure.storage.common.ValidatableContent- Parameters:
contentValidationAlgorithm- The transfer validation checksum algorithm.- Returns:
- The updated options.
-