CloudPageBlob Class

Definition

Represents a Microsoft Azure page blob.

public class CloudPageBlob extends CloudBlob
Inheritance
java.lang.Object
CloudPageBlob

Inherited Members

Constructors

CloudPageBlob(final CloudPageBlob otherBlob)

Creates an instance of the class by copying values from another page blob.

CloudPageBlob(final StorageUri blobAbsoluteUri)

Creates an instance of the class using the specified absolute URI and storage service client.

CloudPageBlob(final StorageUri blobAbsoluteUri, final StorageCredentials credentials)

Creates an instance of the class using the specified absolute StorageUri and credentials.

CloudPageBlob(final StorageUri blobAbsoluteUri, final String snapshotID, final StorageCredentials credentials)

Creates an instance of the class using the specified absolute StorageUri, snapshot ID, and credentials.

CloudPageBlob(final URI blobAbsoluteUri)

Creates an instance of the class using the specified absolute URI and storage service client.

CloudPageBlob(final URI blobAbsoluteUri, final StorageCredentials credentials)

Creates an instance of the class using the specified absolute URI and credentials.

CloudPageBlob(final URI blobAbsoluteUri, final String snapshotID, final StorageCredentials credentials)

Creates an instance of the class using the specified absolute URI, snapshot ID, and credentials.

CloudPageBlob(String blobName, String snapshotID, CloudBlobContainer container)

Creates an instance of the class using the specified type, name, snapshot ID, and container.

Methods

clearPages(final long offset, final long length)

Clears pages from a page blob.

Calling releases the storage space used by the specified pages. Pages that have been cleared are no longer tracked as part of the page blob, and no longer incur a charge against the storage account.

clearPages(final long offset, final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Clears pages from a page blob using the specified lease ID, request options, and operation context.

Calling releases the storage space used by the specified pages. Pages that have been cleared are no longer tracked as part of the page blob, and no longer incur a charge against the storage account.

create(final long length)

Creates a page blob. If the blob already exists, this will replace it. To instead throw an error if the blob already exists, use the create(long, AccessCondition, BlobRequestOptions, OperationContext) overload with AccessCondition#generateIfNotExistsCondition().

create(final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Creates a page blob using the specified request options and operation context. If the blob already exists, this will replace it. To instead throw an error if the blob already exists, use AccessCondition#generateIfNotExistsCondition().

create(final long length, final PremiumPageBlobTier premiumBlobTier, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Creates a page blob using the specified request options and operation context. If the blob already exists, this will replace it. To instead throw an error if the blob already exists, use AccessCondition#generateIfNotExistsCondition().

downloadPageRanges()

Returns a collection of page ranges and their starting and ending byte offsets.

The start and end byte offsets for each page range are inclusive.

downloadPageRanges(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Returns a collection of page ranges and their starting and ending byte offsets using the specified request options and operation context.

downloadPageRanges(final long offset, final Long length)

Returns a collection of page ranges and their starting and ending byte offsets.

downloadPageRanges(final long offset, final Long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Returns a collection of page ranges and their starting and ending byte offsets using the specified request options and operation context.

downloadPageRangesDiff(final String previousSnapshot)

Gets the collection of page ranges that differ between a specified snapshot and this object.

downloadPageRangesDiff(final String previousSnapshot, final Long offset, final Long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Gets the collection of page ranges that differ between a specified snapshot and this object.

openWriteExisting()

Opens an output stream object to write data to the page blob. The page blob must already exist and any existing data may be overwritten.

openWriteExisting(AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Opens an output stream object to write data to the page blob, using the specified lease ID, request options and operation context. The page blob must already exist and any existing data may be overwritten.

openWriteNew(final long length)

Opens an output stream object to write data to the page blob. The page blob does not need to yet exist and will be created with the length specified. If the blob already exists on the service, it will be overwritten.

To avoid overwriting and instead throw an error, please use the openWriteNew(long, AccessCondition, BlobRequestOptions, OperationContext) overload with the appropriate AccessCondition.

openWriteNew(final long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Opens an output stream object to write data to the page blob, using the specified lease ID, request options and operation context. The page blob does not need to yet exist and will be created with the length specified.If the blob already exists on the service, it will be overwritten.

To avoid overwriting and instead throw an error, please pass in an AccessCondition generated using AccessCondition#generateIfNotExistsCondition().

openWriteNew(final long length, final PremiumPageBlobTier premiumBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Opens an output stream object to write data to the page blob, using the specified lease ID, request options and operation context. The page blob does not need to yet exist and will be created with the length specified.If the blob already exists on the service, it will be overwritten.

To avoid overwriting and instead throw an error, please pass in an AccessCondition generated using AccessCondition#generateIfNotExistsCondition().

resize(long size)

Resizes the page blob to the specified size.

resize(long size, AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Resizes the page blob to the specified size.

setStreamWriteSizeInBytes(final int streamWriteSizeInBytes)

Sets the number of bytes to buffer when writing to a BlobOutputStream.

startCopy(final CloudPageBlob sourceBlob)

Requests the service to start copying a blob's contents, properties, and metadata to a new blob.

startCopy(final CloudPageBlob sourceBlob, final AccessCondition sourceAccessCondition, final AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext)

Requests the service to start copying a blob's contents, properties, and metadata to a new blob, using the specified access conditions, lease ID, request options, and operation context.

startCopy(final CloudPageBlob sourceBlob, final PremiumPageBlobTier premiumBlobTier, final AccessCondition sourceAccessCondition, final AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext)

Requests the service to start copying a blob's contents, properties, and metadata to a new blob, using the specified blob tier, access conditions, lease ID, request options, and operation context.

startIncrementalCopy(final CloudPageBlob sourceSnapshot)

Requests the service to start an incremental copy of another page blob's contents, properties, and metadata to this blob.

startIncrementalCopy(final CloudPageBlob sourceSnapshot, final AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext)

Requests the service to start copying a blob's contents, properties, and metadata to a new blob, using the specified access conditions, lease ID, request options, and operation context.

startIncrementalCopy(final URI sourceSnapshot)

Requests the service to start an incremental copy of another page blob's contents, properties, and metadata to this blob.

startIncrementalCopy(final URI sourceSnapshot, final AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext)

Requests the service to start copying a blob's contents, properties, and metadata to a new blob, using the specified access conditions, lease ID, request options, and operation context.

updateSequenceNumberFromResponse(HttpURLConnection request)
upload(final InputStream sourceStream, final long length)

Uploads the source stream data to the page blob. If the blob already exists on the service, it will be overwritten.

upload(final InputStream sourceStream, final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Uploads the source stream data to the page blob using the specified lease ID, request options, and operation context. If the blob already exists on the service, it will be overwritten.

upload(final InputStream sourceStream, final long length, final PremiumPageBlobTier premiumBlobTier, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Uploads the source stream data to the page blob using the specified lease ID, request options, and operation context. If the blob already exists on the service, it will be overwritten.

uploadFromByteArray(final byte[] buffer, final int offset, final int length, final PremiumPageBlobTier premiumBlobTier, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Uploads a blob from data in a byte array. If the blob already exists on the service, it will be overwritten.

uploadFromFile(final String path, final PremiumPageBlobTier premiumBlobTier, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Uploads a blob from a file. If the blob already exists on the service, it will be overwritten.

uploadPages(final InputStream sourceStream, final long offset, final long length)

Uploads a range of contiguous pages, up to 4 MB in size, at the specified offset in the page blob.

uploadPages(final InputStream sourceStream, final long offset, final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Uploads a range of contiguous pages, up to 4 MB in size, at the specified offset in the page blob, using the specified lease ID, request options, and operation context.

uploadPremiumPageBlobTier(final PremiumPageBlobTier premiumBlobTier)

Sets the blob tier on a page blob on a premium storage account.

uploadPremiumPageBlobTier(final PremiumPageBlobTier premiumBlobTier, BlobRequestOptions options, OperationContext opContext)

Sets the tier on a page blob on a premium storage account.

Applies to