Class PageBlobUploadPagesOptions
java.lang.Object
com.azure.storage.blob.options.PageBlobUploadPagesOptions
- All Implemented Interfaces:
com.azure.storage.common.ValidatableContent
public final class PageBlobUploadPagesOptions
extends Object
implements com.azure.storage.common.ValidatableContent
Extended options that may be passed when uploading pages to a page blob.
-
Constructor Summary
ConstructorsConstructorDescriptionPageBlobUploadPagesOptions(PageRange pageRange, com.azure.core.util.BinaryData body) Creates a new instance ofPageBlobUploadPagesOptions. -
Method Summary
Modifier and TypeMethodDescriptioncom.azure.core.util.BinaryDatagetBody()Gets the data to write to the page.byte[]Gets the MD5 hash of the page content.com.azure.storage.common.ContentValidationAlgorithmGets the algorithm to use for transfer content validation on the request.Gets the page range for the request.Gets thePageBlobRequestConditions.setContentMd5(byte[] contentMd5) Sets the MD5 hash of the page content for transactional verification.setContentValidationAlgorithm(com.azure.storage.common.ContentValidationAlgorithm contentValidationAlgorithm) Sets the algorithm to use for transfer content validation on the request.setRequestConditions(PageBlobRequestConditions requestConditions) Sets thePageBlobRequestConditions.
-
Constructor Details
-
PageBlobUploadPagesOptions
Creates a new instance ofPageBlobUploadPagesOptions.- Parameters:
pageRange- APageRangeobject. Given that pages must be aligned with 512-byte boundaries, the start offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges are 0-511, 512-1023, etc.body- The data to write to the page. ThisBinaryDatamust have a defined length equal to the specified page range and must be replayable if retries are enabled (the default), seeBinaryData.isReplayable().- Throws:
NullPointerException- IfpageRangeorbodyis null, or ifbodydoes not have a defined length.
-
-
Method Details
-
getPageRange
Gets the page range for the request.- Returns:
- The page range for the request.
-
getBody
public com.azure.core.util.BinaryData getBody()Gets the data to write to the page.- Returns:
- The data to write to the page.
-
getContentMd5
public byte[] getContentMd5()Gets the MD5 hash of the page content.- Returns:
- An MD5 hash of the content, or null.
-
setContentMd5
Sets the MD5 hash of the page content for transactional verification.- Parameters:
contentMd5- An MD5 hash of the page content.- Returns:
- The updated options.
-
getRequestConditions
Gets thePageBlobRequestConditions.- Returns:
- The request conditions.
-
setRequestConditions
Sets thePageBlobRequestConditions.- 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 on the request. SeeContentValidationAlgorithmfor more details.- Specified by:
getContentValidationAlgorithmin interfacecom.azure.storage.common.ValidatableContent- Returns:
- The transfer validation checksum algorithm.
-
setContentValidationAlgorithm
public PageBlobUploadPagesOptions 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.
-