public final class CloudPageBlob extends CloudBlob
| Constructor and Description |
|---|
CloudPageBlob(CloudPageBlob otherBlob)
Creates an instance of the
CloudPageBlob class by copying values from another page blob. |
CloudPageBlob(StorageUri blobAbsoluteUri)
Creates an instance of the
CloudPageBlob class using the specified absolute URI and storage service
client. |
CloudPageBlob(StorageUri blobAbsoluteUri,
CloudBlobClient client)
Deprecated.
as of 3.0.0. Please use
CloudPageBlob(StorageUri, StorageCredentials) |
CloudPageBlob(StorageUri blobAbsoluteUri,
CloudBlobClient client,
CloudBlobContainer container)
Deprecated.
as of 3.0.0. Please use
CloudPageBlob(StorageUri, StorageCredentials) |
CloudPageBlob(StorageUri blobAbsoluteUri,
StorageCredentials credentials)
Creates an instance of the
CloudPageBlob class using the specified absolute StorageUri and credentials. |
CloudPageBlob(StorageUri blobAbsoluteUri,
String snapshotID,
CloudBlobClient client)
Deprecated.
as of 3.0.0. Please use
CloudPageBlob(StorageUri, String, StorageCredentials) |
CloudPageBlob(StorageUri blobAbsoluteUri,
String snapshotID,
StorageCredentials credentials)
Creates an instance of the
CloudPageBlob class using the specified absolute StorageUri, snapshot
ID, and credentials. |
CloudPageBlob(URI blobAbsoluteUri)
Creates an instance of the
CloudPageBlob class using the specified absolute URI and storage service
client. |
CloudPageBlob(URI blobAbsoluteUri,
CloudBlobClient client)
Deprecated.
as of 3.0.0. Please use
CloudPageBlob(URI, StorageCredentials) |
CloudPageBlob(URI blobAbsoluteUri,
CloudBlobClient client,
CloudBlobContainer container)
Deprecated.
as of 3.0.0. Please use
CloudPageBlob(URI, StorageCredentials) |
CloudPageBlob(URI blobAbsoluteUri,
StorageCredentials credentials)
Creates an instance of the
CloudPageBlob class using the specified absolute URI and credentials. |
CloudPageBlob(URI blobAbsoluteUri,
String snapshotID,
CloudBlobClient client)
Deprecated.
as of 3.0.0. Please use
CloudPageBlob(URI, String, StorageCredentials) |
CloudPageBlob(URI blobAbsoluteUri,
String snapshotID,
StorageCredentials credentials)
Creates an instance of the
CloudPageBlob class using the specified absolute URI, snapshot ID, and
credentials. |
| Modifier and Type | Method and Description |
|---|---|
void |
clearPages(long offset,
long length)
Clears pages from a page blob.
|
void |
clearPages(long offset,
long length,
AccessCondition accessCondition,
BlobRequestOptions options,
OperationContext opContext)
Clears pages from a page blob using the specified lease ID, request options, and operation context.
|
void |
create(long length)
Creates a page blob.
|
void |
create(long length,
AccessCondition accessCondition,
BlobRequestOptions options,
OperationContext opContext)
Creates a page blob using the specified request options and operation context.
|
ArrayList<PageRange> |
downloadPageRanges()
Returns a collection of page ranges and their starting and ending byte offsets.
|
ArrayList<PageRange> |
downloadPageRanges(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.
|
BlobOutputStream |
openWriteExisting()
Opens an output stream object to write data to the page blob.
|
BlobOutputStream |
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.
|
BlobOutputStream |
openWriteNew(long length)
Opens an output stream object to write data to the page blob.
|
BlobOutputStream |
openWriteNew(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.
|
void |
resize(long size)
Resizes the page blob to the specified size.
|
void |
resize(long size,
AccessCondition accessCondition,
BlobRequestOptions options,
OperationContext opContext)
Resizes the page blob to the specified size.
|
void |
setStreamWriteSizeInBytes(int streamWriteSizeInBytes)
Sets the number of bytes to buffer when writing to a
BlobOutputStream. |
String |
startCopy(CloudPageBlob sourceBlob)
Requests the service to start copying a blob's contents, properties, and metadata to a new blob.
|
String |
startCopy(CloudPageBlob sourceBlob,
AccessCondition sourceAccessCondition,
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.
|
void |
upload(InputStream sourceStream,
long length)
Uploads the source stream data to the page blob.
|
void |
upload(InputStream sourceStream,
long length,
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.
|
void |
uploadPages(InputStream sourceStream,
long offset,
long length)
Uploads a range of contiguous pages, up to 4 MB in size, at the specified offset in the page blob.
|
void |
uploadPages(InputStream sourceStream,
long offset,
long length,
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.
|
abortCopy, abortCopy, acquireLease, acquireLease, acquireLease, breakLease, breakLease, changeLease, changeLease, createSnapshot, createSnapshot, createSnapshot, delete, delete, deleteIfExists, deleteIfExists, download, download, downloadAttributes, downloadAttributes, downloadRange, downloadRange, downloadRangeToByteArray, downloadRangeToByteArray, downloadToByteArray, downloadToByteArray, downloadToFile, downloadToFile, exists, exists, generateSharedAccessSignature, generateSharedAccessSignature, getContainer, getCopyState, getMetadata, getName, getParent, getProperties, getQualifiedStorageUri, getQualifiedUri, getServiceClient, getSnapshotID, getStorageUri, getStreamMinimumReadSizeInBytes, getStreamWriteSizeInBytes, getUri, isSnapshot, openInputStream, openInputStream, releaseLease, releaseLease, renewLease, renewLease, setMetadata, setStreamMinimumReadSizeInBytes, startCopy, startCopy, startCopyFromBlob, startCopyFromBlob, startCopyFromBlob, startCopyFromBlob, uploadFromByteArray, uploadFromByteArray, uploadFromFile, uploadFromFile, uploadMetadata, uploadMetadata, uploadProperties, uploadPropertiespublic CloudPageBlob(URI blobAbsoluteUri) throws StorageException
CloudPageBlob class using the specified absolute URI and storage service
client.blobAbsoluteUri - A java.net.URI object which represents the absolute URI to the blob.StorageException - If a storage service error occurred.public CloudPageBlob(StorageUri blobAbsoluteUri) throws StorageException
CloudPageBlob class using the specified absolute URI and storage service
client.blobAbsoluteUri - A StorageUri object which represents the absolute URI to the blob.StorageException - If a storage service error occurred.public CloudPageBlob(CloudPageBlob otherBlob)
CloudPageBlob class by copying values from another page blob.otherBlob - A CloudPageBlob object which represents the page blob to copy.public CloudPageBlob(URI blobAbsoluteUri, StorageCredentials credentials) throws StorageException
CloudPageBlob class using the specified absolute URI and credentials.blobAbsoluteUri - A java.net.URI object that represents the absolute URI to the blob.credentials - A StorageCredentials object used to authenticate access.StorageException - If a storage service error occurred.public CloudPageBlob(URI blobAbsoluteUri, String snapshotID, StorageCredentials credentials) throws StorageException
CloudPageBlob class using the specified absolute URI, snapshot ID, and
credentials.blobAbsoluteUri - A java.net.URI object that represents the absolute URI to the blob.snapshotID - A String that represents the snapshot version, if applicable.credentials - A StorageCredentials object used to authenticate access.StorageException - If a storage service error occurred.public CloudPageBlob(StorageUri blobAbsoluteUri, StorageCredentials credentials) throws StorageException
CloudPageBlob class using the specified absolute StorageUri and credentials.blobAbsoluteUri - A StorageUri object that represents the absolute URI to the blob.credentials - A StorageCredentials object used to authenticate access.StorageException - If a storage service error occurred.public CloudPageBlob(StorageUri blobAbsoluteUri, String snapshotID, StorageCredentials credentials) throws StorageException
CloudPageBlob class using the specified absolute StorageUri, snapshot
ID, and credentials.blobAbsoluteUri - A StorageUri object that represents the absolute URI to the blob.snapshotID - A String that represents the snapshot version, if applicable.credentials - A StorageCredentials object used to authenticate access.StorageException - If a storage service error occurred.@Deprecated public CloudPageBlob(URI blobAbsoluteUri, CloudBlobClient client) throws StorageException
CloudPageBlob(URI, StorageCredentials)CloudPageBlob class using the specified URI and cloud blob client.blobAbsoluteUri - A java.net.URI object which represents the absolute URI to the blob.client - A CloudBlobClient object that specifies the endpoint for the Blob service.StorageException - If a storage service error occurred.@Deprecated public CloudPageBlob(StorageUri blobAbsoluteUri, CloudBlobClient client) throws StorageException
CloudPageBlob(StorageUri, StorageCredentials)CloudPageBlob class using the specified URI and cloud blob client.blobAbsoluteUri - A StorageUri object which represents the absolute URI to the blob.client - A CloudBlobClient object that specifies the endpoint for the Blob service.StorageException - If a storage service error occurred.@Deprecated public CloudPageBlob(URI blobAbsoluteUri, CloudBlobClient client, CloudBlobContainer container) throws StorageException
CloudPageBlob(URI, StorageCredentials)CloudPageBlob class using the specified URI, cloud blob client, and cloud
blob container.blobAbsoluteUri - A java.net.URI object which represents the absolute URI to the blob.client - A CloudBlobClient object that specifies the endpoint for the Blob service.container - A CloudBlobContainer object which represents the container to use for the blob.StorageException - If a storage service error occurred.@Deprecated public CloudPageBlob(StorageUri blobAbsoluteUri, CloudBlobClient client, CloudBlobContainer container) throws StorageException
CloudPageBlob(StorageUri, StorageCredentials)CloudPageBlob class using the specified URI, cloud blob client, and cloud
blob container.blobAbsoluteUri - A StorageUri object which represents the absolute URI to the blob.client - A CloudBlobClient object that specifies the endpoint for the Blob service.container - A CloudBlobContainer object which represents the container to use for the blob.StorageException - If a storage service error occurred.@Deprecated public CloudPageBlob(URI blobAbsoluteUri, String snapshotID, CloudBlobClient client) throws StorageException
CloudPageBlob(URI, String, StorageCredentials)CloudPageBlob class using the specified URI, snapshot ID, and cloud blob
client.blobAbsoluteUri - A java.net.URI object which represents the absolute URI to the blob.snapshotID - A String which represents the snapshot version, if applicable.client - A CloudBlobContainer object which represents the container to use for the blob.StorageException - If a storage service error occurred.@Deprecated public CloudPageBlob(StorageUri blobAbsoluteUri, String snapshotID, CloudBlobClient client) throws StorageException
CloudPageBlob(StorageUri, String, StorageCredentials)CloudPageBlob class using the specified URI, snapshot ID, and cloud blob
client.blobAbsoluteUri - A StorageUri object which represents the absolute URI to the blob.snapshotID - A String which represents the snapshot version, if applicable.client - A CloudBlobContainer object which represents the container to use for the blob.StorageException - If a storage service error occurred.@DoesServiceRequest public final String startCopy(CloudPageBlob sourceBlob) throws StorageException, URISyntaxException
sourceBlob - A CloudPageBlob object that represents the source blob to copy.String which represents the copy ID associated with the copy operation.StorageException - If a storage service error occurred.URISyntaxException@DoesServiceRequest public final String startCopy(CloudPageBlob sourceBlob, AccessCondition sourceAccessCondition, AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext) throws StorageException, URISyntaxException
sourceBlob - A CloudPageBlob object that represents the source blob to copy.sourceAccessCondition - An AccessCondition object that represents the access conditions for the source blob.destinationAccessCondition - An AccessCondition object that represents the access conditions for the destination blob.options - A BlobRequestOptions object that specifies any additional options for the request. Specifying
null will use the default request options from the associated service client (
CloudBlobClient).opContext - An OperationContext object that represents the context for the current operation. This object
is used to track requests to the storage service, and to provide additional runtime information about
the operation.String which represents the copy ID associated with the copy operation.StorageException - If a storage service error occurred.URISyntaxException@DoesServiceRequest public void clearPages(long offset, long length) throws StorageException
Calling clearPages 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.
offset - The offset, in bytes, at which to begin clearing pages. This value must be a multiple of 512.length - The length, in bytes, of the data range to be cleared. This value must be a multiple of 512.StorageException - If a storage service error occurred.@DoesServiceRequest public void clearPages(long offset, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext) throws StorageException
Calling clearPages 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.
offset - A long which represents the offset, in bytes, at which to begin clearing pages. This
value must be a multiple of 512.length - A long which represents the length, in bytes, of the data range to be cleared. This value
must be a multiple of 512.accessCondition - An AccessCondition object which represents the access conditions for the blob.options - A BlobRequestOptions object that specifies any additional options for the request. Specifying
null will use the default request options from the associated service client (
CloudBlobClient).opContext - An OperationContext object which represents the context for the current operation. This object
is used to track requests to the storage service, and to provide additional runtime information about
the operation.StorageException - If a storage service error occurred.@DoesServiceRequest public void create(long length) throws StorageException
create(long, AccessCondition, BlobRequestOptions, OperationContext)
overload with AccessCondition.generateIfNotExistsCondition().length - A long which represents the size, in bytes, of the page blob.IllegalArgumentException - If the length is not a multiple of 512.StorageException - If a storage service error occurred.@DoesServiceRequest public void create(long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext) throws StorageException
AccessCondition.generateIfNotExistsCondition().length - A long which represents the size, in bytes, of the page blob.accessCondition - An AccessCondition object which represents the access conditions for the blob.options - A BlobRequestOptions object that specifies any additional options for the request. Specifying
null will use the default request options from the associated service client (
CloudBlobClient).opContext - An OperationContext object which represents the context for the current operation. This object
is used to track requests to the storage service, and to provide additional runtime information about
the operation.IllegalArgumentException - If the length is not a multiple of 512.StorageException - If a storage service error occurred.@DoesServiceRequest public ArrayList<PageRange> downloadPageRanges() throws StorageException
The start and end byte offsets for each page range are inclusive.
ArrayList object which represents the set of page ranges and their starting and ending
byte offsets.StorageException - If a storage service error occurred.@DoesServiceRequest public ArrayList<PageRange> downloadPageRanges(AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext) throws StorageException
accessCondition - An AccessCondition object which represents the access conditions for the blob.options - A BlobRequestOptions object that specifies any additional options for the request. Specifying
null will use the default request options from the associated service client (
CloudBlobClient).opContext - An OperationContext object which represents the context for the current operation. This object
is used to track requests to the storage service, and to provide additional runtime information about
the operation.ArrayList object which represents the set of page ranges and their starting and ending
byte offsets.StorageException - If a storage service error occurred.@DoesServiceRequest public BlobOutputStream openWriteExisting() throws StorageException
BlobOutputStream object used to write data to the blob.StorageException - If a storage service error occurred.@DoesServiceRequest public BlobOutputStream openWriteExisting(AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext) throws StorageException
accessCondition - An AccessCondition object which represents the access conditions for the blob.options - A BlobRequestOptions object that specifies any additional options for the request. Specifying
null will use the default request options from the associated service client (
CloudBlobClient).opContext - An OperationContext object which represents the context for the current operation. This object
is used to track requests to the storage service, and to provide additional runtime information about
the operation.BlobOutputStream object used to write data to the blob.StorageException - If a storage service error occurred.@DoesServiceRequest public BlobOutputStream openWriteNew(long length) throws StorageException
To avoid overwriting and instead throw an error, please use the
openWriteNew(long, AccessCondition, BlobRequestOptions, OperationContext) overload with the appropriate
AccessCondition.
length - A long which represents the length, in bytes, of the stream to create. This value must be
a multiple of 512.BlobOutputStream object used to write data to the blob.StorageException - If a storage service error occurred.@DoesServiceRequest public BlobOutputStream openWriteNew(long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext) throws StorageException
To avoid overwriting and instead throw an error, please pass in an AccessCondition generated using
AccessCondition.generateIfNotExistsCondition().
length - A long which represents the length, in bytes, of the stream to create. This value must be
a multiple of 512.accessCondition - An AccessCondition object which represents the access conditions for the blob.options - A BlobRequestOptions object that specifies any additional options for the request. Specifying
null will use the default request options from the associated service client (
CloudBlobClient).opContext - An OperationContext object which represents the context for the current operation. This object
is used to track requests to the storage service, and to provide additional runtime information about
the operation.BlobOutputStream object used to write data to the blob.StorageException - If a storage service error occurred.public void resize(long size)
throws StorageException
size - A long which represents the size of the page blob, in bytes.StorageException - If a storage service error occurred.public void resize(long size,
AccessCondition accessCondition,
BlobRequestOptions options,
OperationContext opContext)
throws StorageException
size - A long which represents the size of the page blob, in bytes.accessCondition - An AccessCondition object which represents the access conditions for the blob.options - A BlobRequestOptions object that specifies any additional options for the request. Specifying
null will use the default request options from the associated service client (
CloudBlobClient).opContext - An OperationContext object which represents the context for the current operation. This object
is used to track requests to the storage service, and to provide additional runtime information about
the operation.StorageException - If a storage service error occurred.@DoesServiceRequest public void upload(InputStream sourceStream, long length) throws StorageException, IOException
upload in class CloudBlobsourceStream - An InputStream object to read from.length - A long which represents the length, in bytes, of the stream data, must be non zero and a
multiple of 512.IOException - If an I/O exception occurred.StorageException - If a storage service error occurred.@DoesServiceRequest public void upload(InputStream sourceStream, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext) throws StorageException, IOException
upload in class CloudBlobsourceStream - An InputStream object to read from.length - A long which represents the length, in bytes, of the stream data. This must be great than
zero and a multiple of 512.accessCondition - An AccessCondition object which represents the access conditions for the blob.options - A BlobRequestOptions object that specifies any additional options for the request. Specifying
null will use the default request options from the associated service client (
CloudBlobClient).opContext - An OperationContext object which represents the context for the current operation. This object
is used to track requests to the storage service, and to provide additional runtime information about
the operation.IOException - If an I/O exception occurred.StorageException - If a storage service error occurred.@DoesServiceRequest public void uploadPages(InputStream sourceStream, long offset, long length) throws StorageException, IOException
sourceStream - An InputStream object which represents the input stream to write to the page blob.offset - A long which represents the offset, in number of bytes, at which to begin writing the
data. This value must be a multiple of 512.length - A long which represents the length, in bytes, of the data to write. This value must be a
multiple of 512.IllegalArgumentException - If the offset or length are not multiples of 512, or if the length is greater than 4 MB.IOException - If an I/O exception occurred.StorageException - If a storage service error occurred.@DoesServiceRequest public void uploadPages(InputStream sourceStream, long offset, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext) throws StorageException, IOException
sourceStream - An InputStream object which represents the input stream to write to the page blob.offset - A long which represents the offset, in number of bytes, at which to begin writing the
data. This value must be a multiple of
512.length - A long which represents the length, in bytes, of the data to write. This value must be a
multiple of 512.accessCondition - An AccessCondition object which represents the access conditions for the blob.options - A BlobRequestOptions object that specifies any additional options for the request. Specifying
null will use the default request options from the associated service client (
CloudBlobClient).opContext - An OperationContext object which represents the context for the current operation. This object
is used to track requests to the storage service, and to provide additional runtime information about
the operation.IllegalArgumentException - If the offset or length are not multiples of 512, or if the length is greater than 4 MB.IOException - If an I/O exception occurred.StorageException - If a storage service error occurred.public void setStreamWriteSizeInBytes(int streamWriteSizeInBytes)
BlobOutputStream.setStreamWriteSizeInBytes in class CloudBlobstreamWriteSizeInBytes - An int which represents the maximum number of bytes to buffer when writing to a page blob
stream. This value must be a
multiple of 512 and
less than or equal to 4 MB.IllegalArgumentException - If streamWriteSizeInBytes is less than 512, greater than 4 MB, or not a multiple or 512.Copyright © 2015. All Rights Reserved.