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 Details

    • PageBlobUploadPagesOptions

      public PageBlobUploadPagesOptions(PageRange pageRange, com.azure.core.util.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().
      Throws:
      NullPointerException - If pageRange or body is null, or if body does not have a defined length.
  • Method Details

    • getPageRange

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

      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.
    • getRequestConditions

      public PageBlobRequestConditions getRequestConditions()
      Returns:
      The request conditions.
    • setRequestConditions

      public PageBlobUploadPagesOptions setRequestConditions(PageBlobRequestConditions requestConditions)
      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. See ContentValidationAlgorithm for more details.
      Specified by:
      getContentValidationAlgorithm in interface com.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. See ContentValidationAlgorithm for more details.
      Specified by:
      setContentValidationAlgorithm in interface com.azure.storage.common.ValidatableContent
      Parameters:
      contentValidationAlgorithm - The transfer validation checksum algorithm.
      Returns:
      The updated options.