PageBlobUploadPagesOptions Class

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

Implements

public final class PageBlobUploadPagesOptions
implements ValidatableContent

Extended options that may be passed when uploading pages to a page blob.

Constructor Summary

Constructor Description
PageBlobUploadPagesOptions(PageRange pageRange, BinaryData body)

Creates a new instance of PageBlobUploadPagesOptions.

Method Summary

Modifier and Type Method and Description
BinaryData getBody()

Gets the data to write to the page.

byte[] getContentMd5()

Gets the MD5 hash of the page content.

ContentValidationAlgorithm getContentValidationAlgorithm()

Gets the algorithm to use for transfer content validation on the request.

PageRange getPageRange()

Gets the page range for the request.

PageBlobRequestConditions getRequestConditions()

Gets the PageBlobRequestConditions.

PageBlobUploadPagesOptions setContentMd5(byte[] contentMd5)

Sets the MD5 hash of the page content for transactional verification.

PageBlobUploadPagesOptions setContentValidationAlgorithm(ContentValidationAlgorithm contentValidationAlgorithm)

Sets the algorithm to use for transfer content validation on the request.

PageBlobUploadPagesOptions setRequestConditions(PageBlobRequestConditions requestConditions)

Sets the PageBlobRequestConditions.

Methods inherited from java.lang.Object

Constructor Details

PageBlobUploadPagesOptions

public PageBlobUploadPagesOptions(PageRange pageRange, BinaryData body)

Creates a new instance of PageBlobUploadPagesOptions.

Parameters:

pageRange - A PageRange object. 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. This BinaryData must have a defined length equal to the specified page range and must be replayable if retries are enabled (the default), see BinaryData#isReplayable().

Method Details

getBody

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

getContentValidationAlgorithm

public ContentValidationAlgorithm getContentValidationAlgorithm()

Gets the algorithm to use for transfer content validation on the request. See ContentValidationAlgorithm for more details.

Returns:

The transfer validation checksum algorithm.

getPageRange

public PageRange getPageRange()

Gets the page range for the request.

Returns:

The page range for the request.

getRequestConditions

public PageBlobRequestConditions getRequestConditions()

Gets the PageBlobRequestConditions.

Returns:

The request conditions.

setContentMd5

public PageBlobUploadPagesOptions setContentMd5(byte[] contentMd5)

Sets the MD5 hash of the page content for transactional verification.

Parameters:

contentMd5 - An MD5 hash of the page content.

Returns:

The updated options.

setContentValidationAlgorithm

public PageBlobUploadPagesOptions setContentValidationAlgorithm(ContentValidationAlgorithm contentValidationAlgorithm)

Sets the algorithm to use for transfer content validation on the request. See ContentValidationAlgorithm for more details.

Parameters:

contentValidationAlgorithm - The transfer validation checksum algorithm.

Returns:

The updated options.

setRequestConditions

public PageBlobUploadPagesOptions setRequestConditions(PageBlobRequestConditions requestConditions)

Sets the PageBlobRequestConditions.

Parameters:

requestConditions - The request conditions.

Returns:

The updated options.

Applies to