CloudBlob Class
- java.
lang. Object - ListBlobItem
- com.
microsoft. azure. storage. blob. CloudBlob
- com.
public class CloudBlob implements ListBlobItem
Represents a Microsoft Azure blob. This is the base class for the CloudBlockBlob and CloudPageBlob classes.
Field Summary
Modifier and Type | Field and Description |
---|---|
Cloud |
blobServiceClient
Represents the blob client. |
Cloud |
parent
Represents the blob's directory. |
int |
streamMinimumReadSizeInBytes
Holds the minimum read size when using a BlobInputStream. |
int |
streamWriteSizeInBytes
Holds the number of bytes to buffer when writing to a BlobOutputStream (block and page blobs). |
Constructor Summary
Constructor | Description |
---|---|
CloudBlob(final BlobType type, final StorageUri uri, final String snapshotID, final StorageCredentials credentials) |
Creates an instance of the class using the specified URI, snapshot ID, and cloud blob client. |
CloudBlob(final BlobType type, String blobName, String snapshotID, CloudBlobContainer container) |
Creates an instance of the class using the specified type, name, snapshot ID, and container. |
CloudBlob(final CloudBlob otherBlob) |
Creates an instance of the class by copying values from another blob. |
Method Summary
Modifier and Type | Method and Description |
---|---|
final void |
abortCopy(final String copyId)
Aborts an ongoing blob copy operation. |
final void |
abortCopy(final String copyId, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Aborts an ongoing blob copy operation. |
final String |
acquireLease()
Acquires a new infinite lease on the blob. |
final String |
acquireLease(final Integer leaseTimeInSeconds, final String proposedLeaseId)
Acquires a new lease on the blob with the specified lease time and proposed lease ID. |
final String |
acquireLease(final Integer leaseTimeInSeconds, final String proposedLeaseId, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Acquires a new lease on the blob with the specified lease time, proposed lease ID, request options, and operation context. |
final void |
assertCorrectBlobType()
Asserts that the blob has the correct blob type specified in the blob attributes. |
void |
assertNoWriteOperationForSnapshot()
Asserts that write operation is not done for snapshot. |
final long |
breakLease(final Integer breakPeriodInSeconds)
Breaks the lease and ensures that another client cannot acquire a new lease until the current lease period has expired. |
final long |
breakLease(final Integer breakPeriodInSeconds, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Breaks the existing lease, using the specified request options and operation context, and ensures that another client cannot acquire a new lease until the current lease period has expired. |
final String |
changeLease(final String proposedLeaseId, final AccessCondition accessCondition)
Changes the existing lease ID to the proposed lease ID. |
final String |
changeLease(final String proposedLeaseId, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Changes the existing lease ID to the proposed lease Id with the specified access conditions, request options, and operation context. |
final Cloud |
createSnapshot()
Creates a snapshot of the blob. |
final Cloud |
createSnapshot(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Creates a snapshot of the blob using the specified request options and operation context. |
final Cloud |
createSnapshot(final HashMap<String, String> metadata, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Creates a snapshot of the blob using the specified request options and operation context. |
final void |
delete()
Deletes the blob. If a delete retention policy is enabled on the service, the blob will be retained for a specified period of time, before being removed permanently by garbage collection. |
final void |
delete(final DeleteSnapshotsOption deleteSnapshotsOption, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Deletes the blob using the specified snapshot and request options, and operation context. If a delete retention policy is enabled on the service, the blob will be retained for a specified period of time, before being removed permanently by garbage collection. A blob that has snapshots cannot be deleted unless the snapshots are also deleted. If a blob has snapshots, use the DELETE_SNAPSHOTS_ONLY or INCLUDE_SNAPSHOTS value in the parameter to specify how the snapshots should be handled when the blob is deleted. |
final boolean |
deleteIfExists()
Deletes the blob if it exists. A blob that has snapshots cannot be deleted unless the snapshots are also deleted. If a blob has snapshots, use the DELETE_SNAPSHOTS_ONLY or INCLUDE_SNAPSHOTS value in the parameter to specify how the snapshots should be handled when the blob is deleted. |
final boolean |
deleteIfExists(final DeleteSnapshotsOption deleteSnapshotsOption, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Deletes the blob if it exists, using the specified snapshot and request options, and operation context. A blob that has snapshots cannot be deleted unless the snapshots are also deleted. If a blob has snapshots, use the DELETE_SNAPSHOTS_ONLY or INCLUDE_SNAPSHOTS value in the parameter to specify how the snapshots should be handled when the blob is deleted. |
final void |
download(final OutputStream outStream)
Downloads the contents of a blob to a stream. |
final void |
download(final OutputStream outStream, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Downloads the contents of a blob to a stream using the specified request options and operation context. |
Account |
downloadAccountInfo()
Gets information related to the storage account in which this blob resides. |
Account |
downloadAccountInfo(BlobRequestOptions options, OperationContext opContext)
Gets information related to the storage account in which this blob resides. |
Storage |
downloadAccountInformationImpl(final RequestOptions options) |
final void |
downloadAttributes()
Populates a blob's properties and metadata. This method populates the blob's system properties and user-defined metadata. Before reading or modifying a blob's properties or metadata, call this method or its overload to retrieve the latest values for the blob's properties and metadata from the Microsoft Azure storage service. |
final void |
downloadAttributes(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Populates a blob's properties and metadata using the specified request options and operation context. This method populates the blob's system properties and user-defined metadata. Before reading or modifying a blob's properties or metadata, call this method or its overload to retrieve the latest values for the blob's properties and metadata from the Microsoft Azure storage service. |
final void |
downloadRange(final long offset, final Long length, final OutputStream outStream)
Downloads the contents of a blob to a stream. |
final void |
downloadRange(final long offset, final Long length, final OutputStream outStream, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Downloads the contents of a blob to a stream using the specified request options and operation context. |
final int |
downloadRangeInternal(final long blobOffset, final Long length, final byte[] buffer, final int bufferOffset, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Downloads a range of bytes from the blob to the given byte buffer. |
final int |
downloadRangeToByteArray(final long offset, final Long length, final byte[] buffer, final int bufferOffset)
Downloads a range of bytes from the blob to the given byte buffer. |
final int |
downloadRangeToByteArray(final long offset, final Long length, final byte[] buffer, final int bufferOffset, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Downloads a range of bytes from the blob to the given byte buffer, using the specified request options and operation context. |
final int |
downloadToByteArray(final byte[] buffer, final int bufferOffset)
Downloads a range of bytes from the blob to the given byte buffer. |
final int |
downloadToByteArray(final byte[] buffer, final int bufferOffset, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Downloads a range of bytes from the blob to the given byte buffer, using the specified request options and operation context. |
void |
downloadToFile(final String path)
Downloads a blob, storing the contents in a file. |
void |
downloadToFile(final String path, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Downloads a blob, storing the contents in a file. |
final boolean |
exists()
Checks to see if the blob exists. |
final boolean |
exists(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Checks to see if the blob exists, using the specified request options and operation context. |
String |
generateSharedAccessSignature(final SharedAccessBlobPolicy policy, final SharedAccessBlobHeaders headers, final String groupPolicyIdentifier)
Returns a shared access signature for the blob using the specified group policy identifier and operation context. Note this does not contain the leading "?". |
String |
generateSharedAccessSignature(final SharedAccessBlobPolicy policy, final SharedAccessBlobHeaders headers, final String groupPolicyIdentifier, final IPRange ipRange, final SharedAccessProtocols protocols)
Returns a shared access signature for the blob using the specified group policy identifier and operation context. Note this does not contain the leading "?". |
String |
generateSharedAccessSignature(final SharedAccessBlobPolicy policy, final SharedAccessBlobHeaders headers, final String groupPolicyIdentifier, final IPRange ipRange, final SharedAccessProtocols protocols, boolean skipDecoding)
Returns a shared access signature for the blob using the specified group policy identifier and operation context. Note this does not contain the leading "?". |
String |
generateSharedAccessSignature(final SharedAccessBlobPolicy policy, final String groupPolicyIdentifier)
Returns a shared access signature for the blob using the specified group policy identifier and operation context. Note this does not contain the leading "?". |
String |
generateUserDelegationSharedAccessSignature(final UserDelegationKey delegationKey, final SharedAccessBlobPolicy policy, final SharedAccessBlobHeaders headers, final IPRange ipRange, final SharedAccessProtocols protocols)
Returns a shared access signature based on a user delegation key for the blob using the specified group policy identifier and operation context. Note this does not contain the leading "?". |
String |
generateUserDelegationSharedAccessSignature(UserDelegationKey delegationKey, SharedAccessBlobPolicy policy)
Returns a shared access signature based on a user delegation key for the blob using the specified group policy identifier and operation context. Note this does not contain the leading "?". |
final Cloud |
getContainer()
Returns the blob's container. |
Copy |
getCopyState()
Returns the blob's copy state. |
final HashMap<String, String> |
getMetadata()
Returns the metadata for the blob. |
final String |
getName()
Returns the name of the blob. |
final Cloud |
getParent()
Returns the blob item's parent. |
String |
getParentNameFromURI(final StorageUri resourceAddress, final String delimiter, final CloudBlobContainer container)
Retrieves the parent name for a blob URI. |
final Blob |
getProperties()
Returns the blob's properties. |
final Storage |
getQualifiedStorageUri()
Returns the snapshot and/or shared access signature qualified URI for this blob.
|
final URI |
getQualifiedUri()
Returns the snapshot or shared access signature qualified URI for this blob.
|
final Cloud |
getServiceClient()
Returns the Blob service client associated with the blob. |
final String |
getSnapshotID()
Gets the Blob Snapshot ID. |
final Storage |
getSnapshotQualifiedStorageUri()
Returns the blob's URI for both the primary and secondary locations, including query string information if the blob is a snapshot. |
final URI |
getSnapshotQualifiedUri()
Returns the absolute URI to the blob, including query string information if the blob is a snapshot. |
final Storage |
getStorageUri()
Returns the list of URIs for all locations. |
final int |
getStreamMinimumReadSizeInBytes()
Returns the minimum read size when using a BlobInputStream. |
final int |
getStreamWriteSizeInBytes()
Gets the number of bytes to buffer when writing to a BlobOutputStream (block and page blobs). |
final Storage |
getTransformedAddress(final OperationContext opContext)
Returns the transformed URI for the resource if the given credentials require transformation. |
final URI |
getUri()
Returns the URI for this blob. |
final boolean |
isSnapshot()
Indicates whether this blob is a snapshot. |
final Blob |
openInputStream()
Opens a blob input stream to download the blob. Use setStreamMinimumReadSizeInBytes(final int minimumReadSize) to configure the read size. |
final Blob |
openInputStream(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Opens a blob input stream to download the blob using the specified request options and operation context. Use setStreamMinimumReadSizeInBytes(final int minimumReadSize) to configure the read size. |
final Blob |
openInputStream(final long offset, final Long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Opens a blob input stream to download the blob using the specified request options and operation context. If the blob is decrypted as it is downloaded, the final MD5 validation will be skipped. Use setStreamMinimumReadSizeInBytes(final int minimumReadSize) to configure the read size. |
final void |
releaseLease(final AccessCondition accessCondition)
Releases the lease on the blob. |
final void |
releaseLease(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Releases the lease on the blob using the specified request options and operation context. |
final void |
renewLease(final AccessCondition accessCondition)
Renews an existing lease. |
final void |
renewLease(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Renews an existing lease using the specified request options and operation context. |
final void |
setContainer(final CloudBlobContainer container)
Sets the container for the blob. |
final void |
setMetadata(final HashMap<String, String> metadata)
Sets the metadata for the blob. |
final void |
setProperties(final BlobProperties properties)
Sets the properties for the blob. |
final void |
setSnapshotID(final String snapshotID)
Sets the blob snapshot ID. |
void |
setStorageUri(final StorageUri storageUri)
Sets the list of URIs for all locations. |
void |
setStreamMinimumReadSizeInBytes(final int minimumReadSize)
Sets the minimum read size when using a BlobInputStream. |
abstract void |
setStreamWriteSizeInBytes(int streamWriteSizeInBytes)
Sets the number of bytes to buffer when writing to a BlobOutputStream (block and page blobs). |
final String |
startCopy(final URI source)
Requests the service to start copying a URI's contents, properties, and metadata to a new blob. |
final String |
startCopy(final URI source, final AccessCondition sourceAccessCondition, final AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext)
Requests the service to start copying a URI's contents, properties, and metadata to a new blob, using the specified access conditions, lease ID, request options, and operation context. |
final String |
startCopy(final URI source, final String blobTierString, final AccessCondition sourceAccessCondition, final AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext)
Requests the service to start copying a URI's contents, properties, and metadata to a new blob, using the specified premium page blob tier, access conditions, lease ID, request options, and operation context. Note: Setting the premiumPageBlobTier is only supported for premium accounts. |
final String |
startCopy(final URI source, String contentMd5, boolean syncCopy, final String blobTierString, final AccessCondition sourceAccessCondition, final AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext)
Requests the service to start copying a URI's contents, properties, and metadata to a new blob, using the specified premium page blob tier, access conditions, lease ID, request options, and operation context. Note: Setting the premiumPageBlobTier is only supported for premium accounts. |
final String |
startCopy(final URI source, String contentMd5, boolean syncCopy, final String blobTierString, final RehydratePriority rehydratePriority, final AccessCondition sourceAccessCondition, final AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext)
Requests the service to start copying a URI's contents, properties, and metadata to a new blob, using the specified premium page blob tier, rehydrate priority, access conditions, lease ID, request options, and operation context. Note: Setting the premiumPageBlobTier is only supported for premium accounts. |
Storage |
startCopyImpl(final URI source, final String contentMd5, final boolean syncCopy, final boolean incrementalCopy, final String blobTierString, final RehydratePriority rehydratePriority, final AccessCondition sourceAccessCondition, final AccessCondition destinationAccessCondition, final BlobRequestOptions options) |
final void |
undelete()
Un-deletes a blob and all its snapshots that have been soft-deleted. |
final void |
undelete(BlobRequestOptions options, OperationContext opContext)
Un-deletes a blob that has been soft-deleted, using the specified request options, and operation context. The un-delete Blob operation restores the contents and metadata of soft deleted blob and all its snapshots. Attempting to undelete a blob or snapshot that is not soft deleted will succeed without any changes. |
void | updateEtagAndLastModifiedFromResponse(HttpURLConnection request) |
void | updateLengthFromResponse(HttpURLConnection request) |
abstract void |
upload(InputStream sourceStream, long length)
Uploads the source stream data to the blob. If the blob already exists on the service, it will be overwritten. |
abstract void |
upload(InputStream sourceStream, long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Uploads the source stream data to the blob using the specified lease ID, request options, and operation context. If the blob already exists on the service, it will be overwritten. |
void |
uploadFromByteArray(final byte[] buffer, final int offset, final int length)
Uploads a blob from data in a byte array. If the blob already exists on the service, it will be overwritten. |
void |
uploadFromByteArray(final byte[] buffer, final int offset, final int length, 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. |
void |
uploadFromFile(final String path)
Uploads a blob from a file. If the blob already exists on the service, it will be overwritten. |
void |
uploadFromFile(final String path, 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. |
final void |
uploadMetadata()
Uploads the blob's metadata to the storage service. Use downloadAttributes() to retrieve the latest values for the blob's properties and metadata from the Microsoft Azure storage service. |
final void |
uploadMetadata(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Uploads the blob's metadata to the storage service using the specified lease ID, request options, and operation context. Use downloadAttributes() to retrieve the latest values for the blob's properties and metadata from the Microsoft Azure storage service. |
final void |
uploadProperties()
Updates the blob's properties to the storage service. Use downloadAttributes() to retrieve the latest values for the blob's properties and metadata from the Microsoft Azure storage service. |
final void |
uploadProperties(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Updates the blob's properties using the specified lease ID, request options, and operation context. Use downloadAttributes() to retrieve the latest values for the blob's properties and metadata from the Microsoft Azure storage service. |
static<T extends Cloud |
validateCPKHeaders(StorageRequest<CloudBlobClient, T, R> request, BlobRequestOptions options, boolean upload)
If the request options contain a CPK, validate the associated response headers. |
Field Details
blobServiceClient
protected CloudBlobClient blobServiceClient
Represents the blob client.
parent
protected CloudBlobDirectory parent
Represents the blob's directory.
streamMinimumReadSizeInBytes
protected int streamMinimumReadSizeInBytes= Constants.DEFAULT_MINIMUM_READ_SIZE_IN_BYTES
Holds the minimum read size when using a BlobInputStream.
streamWriteSizeInBytes
protected int streamWriteSizeInBytes= Constants.DEFAULT_STREAM_WRITE_IN_BYTES
Holds the number of bytes to buffer when writing to a BlobOutputStream (block and page blobs).
Constructor Details
CloudBlob
protected CloudBlob(final BlobType type, final StorageUri uri, final String snapshotID, final StorageCredentials credentials)
Creates an instance of the class using the specified URI, snapshot ID, and cloud blob client.
Parameters:
String
that represents the snapshot version, if applicable.
Throws:
CloudBlob
protected CloudBlob(final BlobType type, String blobName, String snapshotID, CloudBlobContainer container)
Creates an instance of the class using the specified type, name, snapshot ID, and container.
Parameters:
String
that represents the snapshot version, if applicable.
Throws:
CloudBlob
protected CloudBlob(final CloudBlob otherBlob)
Creates an instance of the class by copying values from another blob.
Parameters:
CloudBlob
object that represents the blob to copy.
Method Details
abortCopy
public final void abortCopy(final String copyId)
Aborts an ongoing blob copy operation.
Parameters:
String
object that identifying the copy operation.
Throws:
abortCopy
public final void abortCopy(final String copyId, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Aborts an ongoing blob copy operation.
Parameters:
String
object that identifying the copy operation.
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
acquireLease
public final String acquireLease()
Acquires a new infinite lease on the blob.
Returns:
String
that represents the lease ID.Throws:
acquireLease
public final String acquireLease(final Integer leaseTimeInSeconds, final String proposedLeaseId)
Acquires a new lease on the blob with the specified lease time and proposed lease ID.
Parameters:
Integer
which specifies the span of time for which to acquire the lease, in seconds. If null, an infinite lease will be acquired. If not null, the value must be greater than zero.
String
that represents the proposed lease ID for the new lease, or null if no lease ID is proposed.
Returns:
String
that represents the lease ID.Throws:
acquireLease
public final String acquireLease(final Integer leaseTimeInSeconds, final String proposedLeaseId, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Acquires a new lease on the blob with the specified lease time, proposed lease ID, request options, and operation context.
Parameters:
Integer
which specifies the span of time for which to acquire the lease, in seconds. If null, an infinite lease will be acquired. If not null, the value must be greater than zero.
String
that represents the proposed lease ID for the new lease, or null if no lease ID is proposed.
null
will use the default request options from the associated service client (CloudBlobClient).
Returns:
String
that represents the lease ID.Throws:
assertCorrectBlobType
protected final void assertCorrectBlobType()
Asserts that the blob has the correct blob type specified in the blob attributes.
Throws:
assertNoWriteOperationForSnapshot
protected void assertNoWriteOperationForSnapshot()
Asserts that write operation is not done for snapshot.
breakLease
public final long breakLease(final Integer breakPeriodInSeconds)
Breaks the lease and ensures that another client cannot acquire a new lease until the current lease period has expired.
Parameters:
Returns:
long
which specifies the time, in seconds, remaining in the lease period.Throws:
breakLease
public final long breakLease(final Integer breakPeriodInSeconds, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Breaks the existing lease, using the specified request options and operation context, and ensures that another client cannot acquire a new lease until the current lease period has expired.
Parameters:
Integer
which specifies the time to wait, in seconds, until the current lease is broken. If null, the break period is the remainder of the current lease, or zero for infinite leases.
null
will use the default request options from the associated service client (CloudBlobClient).
Returns:
long
which represents the time, in seconds, remaining in the lease period.Throws:
changeLease
public final String changeLease(final String proposedLeaseId, final AccessCondition accessCondition)
Changes the existing lease ID to the proposed lease ID.
Parameters:
String
that represents the proposed lease ID for the new lease, or null if no lease ID is proposed.
Returns:
String
that represents the new lease ID.Throws:
changeLease
public final String changeLease(final String proposedLeaseId, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Changes the existing lease ID to the proposed lease Id with the specified access conditions, request options, and operation context.
Parameters:
String
that represents the proposed lease ID for the new lease, or null if no lease ID is proposed.
null
will use the default request options from the associated service client (CloudBlobClient).
Returns:
String
that represents the new lease ID.Throws:
createSnapshot
public final CloudBlob createSnapshot()
Creates a snapshot of the blob.
Returns:
CloudBlob
object that represents the snapshot of the blob.Throws:
createSnapshot
public final CloudBlob createSnapshot(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Creates a snapshot of the blob using the specified request options and operation context.
Parameters:
null
will use the default request options from the associated service client ( CloudBlobClient).
Returns:
CloudBlob
object that represents the snapshot of the blob.Throws:
createSnapshot
public final CloudBlob createSnapshot(final HashMap
Creates a snapshot of the blob using the specified request options and operation context.
Parameters:
null
will use the default request options from the associated service client ( CloudBlobClient).
Returns:
CloudBlob
object that represents the snapshot of the blob.Throws:
delete
public final void delete()
Deletes the blob.
If a delete retention policy is enabled on the service, the blob will be retained for a specified period of time, before being removed permanently by garbage collection.
Throws:
delete
public final void delete(final DeleteSnapshotsOption deleteSnapshotsOption, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Deletes the blob using the specified snapshot and request options, and operation context.
If a delete retention policy is enabled on the service, the blob will be retained for a specified period of time, before being removed permanently by garbage collection.
A blob that has snapshots cannot be deleted unless the snapshots are also deleted. If a blob has snapshots, use the DELETE_SNAPSHOTS_ONLY or INCLUDE_SNAPSHOTS value in the parameter to specify how the snapshots should be handled when the blob is deleted.
Parameters:
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
deleteIfExists
public final boolean deleteIfExists()
Deletes the blob if it exists.
A blob that has snapshots cannot be deleted unless the snapshots are also deleted. If a blob has snapshots, use the DELETE_SNAPSHOTS_ONLY or INCLUDE_SNAPSHOTS value in the parameter to specify how the snapshots should be handled when the blob is deleted.
Returns:
true
if the blob was deleted; otherwise, false
.
Throws:
deleteIfExists
public final boolean deleteIfExists(final DeleteSnapshotsOption deleteSnapshotsOption, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Deletes the blob if it exists, using the specified snapshot and request options, and operation context.
A blob that has snapshots cannot be deleted unless the snapshots are also deleted. If a blob has snapshots, use the DELETE_SNAPSHOTS_ONLY or INCLUDE_SNAPSHOTS value in the parameter to specify how the snapshots should be handled when the blob is deleted.
Parameters:
null
will use the default request options from the associated service client ( CloudBlobClient).
Returns:
true
if the blob existed and was deleted; otherwise, false
Throws:
download
public final void download(final OutputStream outStream)
Downloads the contents of a blob to a stream.
Parameters:
OutputStream
object that represents the target stream.
Throws:
download
public final void download(final OutputStream outStream, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Downloads the contents of a blob to a stream using the specified request options and operation context.
Parameters:
OutputStream
object that represents the target stream.
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
downloadAccountInfo
public AccountInformation downloadAccountInfo()
Gets information related to the storage account in which this blob resides.
Returns:
Throws:
downloadAccountInfo
public AccountInformation downloadAccountInfo(BlobRequestOptions options, OperationContext opContext)
Gets information related to the storage account in which this blob resides.
Parameters:
null
will use the default request options from the associated service client ( CloudBlobClient).
Returns:
Throws:
downloadAccountInformationImpl
protected StorageRequest
Parameters:
downloadAttributes
public final void downloadAttributes()
Populates a blob's properties and metadata.
This method populates the blob's system properties and user-defined metadata. Before reading or modifying a blob's properties or metadata, call this method or its overload to retrieve the latest values for the blob's properties and metadata from the Microsoft Azure storage service.
Throws:
downloadAttributes
public final void downloadAttributes(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Populates a blob's properties and metadata using the specified request options and operation context.
This method populates the blob's system properties and user-defined metadata. Before reading or modifying a blob's properties or metadata, call this method or its overload to retrieve the latest values for the blob's properties and metadata from the Microsoft Azure storage service.
Parameters:
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
downloadRange
public final void downloadRange(final long offset, final Long length, final OutputStream outStream)
Downloads the contents of a blob to a stream.
Parameters:
long
which represents the offset to use as the starting point for the source.
Long
which represents the number of bytes to read or null
.
OutputStream
object that represents the target stream.
Throws:
downloadRange
public final void downloadRange(final long offset, final Long length, final OutputStream outStream, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Downloads the contents of a blob to a stream using the specified request options and operation context.
Parameters:
long
which represents the offset to use as the starting point for the source.
Long
which represents the number of bytes to read or null
.
OutputStream
object that represents the target stream.
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
downloadRangeInternal
protected final int downloadRangeInternal(final long blobOffset, final Long length, final byte[] buffer, final int bufferOffset, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Downloads a range of bytes from the blob to the given byte buffer.
Parameters:
long
which represents the offset within the blob to begin downloading.
Long
which represents the number of bytes to read.
byte
array which represents the buffer to write to.
int
which represents the offset in the byte buffer to begin writing.
Returns:
Throws:
downloadRangeToByteArray
public final int downloadRangeToByteArray(final long offset, final Long length, final byte[] buffer, final int bufferOffset)
Downloads a range of bytes from the blob to the given byte buffer.
Parameters:
long
which represents the byte offset to use as the starting point for the source.
Long
which represents the number of bytes to read or null.
byte
array which represents the buffer to which the blob bytes are downloaded.
int
which represents the byte offset to use as the starting point for the target.
Returns:
Throws:
downloadRangeToByteArray
public final int downloadRangeToByteArray(final long offset, final Long length, final byte[] buffer, final int bufferOffset, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Downloads a range of bytes from the blob to the given byte buffer, using the specified request options and operation context.
Parameters:
long
which represents the byte offset to use as the starting point for the source.
Long
which represents the number of bytes to read or null
.
byte
array which represents the buffer to which the blob bytes are downloaded.
int
which represents the byte offset to use as the starting point for the target.
null
will use the default request options from the associated service client ( CloudBlobClient).
Returns:
Throws:
downloadToByteArray
public final int downloadToByteArray(final byte[] buffer, final int bufferOffset)
Downloads a range of bytes from the blob to the given byte buffer.
Parameters:
byte
array which represents the buffer to which the blob bytes are downloaded.
int
which represents the byte offset to use as the starting point for the target.
Throws:
downloadToByteArray
public final int downloadToByteArray(final byte[] buffer, final int bufferOffset, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Downloads a range of bytes from the blob to the given byte buffer, using the specified request options and operation context.
Parameters:
byte
array which represents the buffer to which the blob bytes are downloaded.
long
which represents the byte offset to use as the starting point for the target.
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
downloadToFile
public void downloadToFile(final String path)
Downloads a blob, storing the contents in a file.
Parameters:
String
which represents the path to the file that will be created with the contents of the blob.
Throws:
downloadToFile
public void downloadToFile(final String path, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Downloads a blob, storing the contents in a file.
Parameters:
String
which represents the path to the file that will be created with the contents of the blob.
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
exists
public final boolean exists()
Checks to see if the blob exists.
Returns:
true
if the blob exists, otherwise false
.
Throws:
exists
public final boolean exists(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Checks to see if the blob exists, using the specified request options and operation context.
Parameters:
null
will use the default request options from the associated service client ( CloudBlobClient).
Returns:
true
if the blob exists, other wise false
.
Throws:
generateSharedAccessSignature
public String generateSharedAccessSignature(final SharedAccessBlobPolicy policy, final SharedAccessBlobHeaders headers, final String groupPolicyIdentifier)
Returns a shared access signature for the blob using the specified group policy identifier and operation context. Note this does not contain the leading "?".
Parameters:
SharedAccessPolicy
object that represents the access policy for the shared access signature.
SharedAccessBlobHeaders
object that represents the optional header values to set for a blob accessed with this shared access signature.
String
that represents the container-level access policy.
Returns:
String
that represents the shared access signature.Throws:
generateSharedAccessSignature
public String generateSharedAccessSignature(final SharedAccessBlobPolicy policy, final SharedAccessBlobHeaders headers, final String groupPolicyIdentifier, final IPRange ipRange, final SharedAccessProtocols protocols)
Returns a shared access signature for the blob using the specified group policy identifier and operation context. Note this does not contain the leading "?".
Parameters:
SharedAccessPolicy
object that represents the access policy for the shared access signature.
SharedAccessBlobHeaders
object that represents the optional header values to set for a blob accessed with this shared access signature.
String
that represents the container-level access policy.
Returns:
String
that represents the shared access signature.Throws:
generateSharedAccessSignature
public String generateSharedAccessSignature(final SharedAccessBlobPolicy policy, final SharedAccessBlobHeaders headers, final String groupPolicyIdentifier, final IPRange ipRange, final SharedAccessProtocols protocols, boolean skipDecoding)
Returns a shared access signature for the blob using the specified group policy identifier and operation context. Note this does not contain the leading "?".
Parameters:
SharedAccessPolicy
object that represents the access policy for the shared access signature.
SharedAccessBlobHeaders
object that represents the optional header values to set for a blob accessed with this shared access signature.
String
that represents the container-level access policy.
boolean
to indicate that the query parameters should not be decoded before being signed. This should only be used if the customer is sure the values passed are in the desired format. This may be useful in some scenarios where the client is used to generate a sas to a third party that will not be using this sdk to make the requests.
Returns:
String
that represents the shared access signature.Throws:
generateSharedAccessSignature
public String generateSharedAccessSignature(final SharedAccessBlobPolicy policy, final String groupPolicyIdentifier)
Returns a shared access signature for the blob using the specified group policy identifier and operation context. Note this does not contain the leading "?".
Parameters:
SharedAccessPolicy
object that represents the access policy for the shared access signature.
String
that represents the container-level access policy.
Returns:
String
that represents the shared access signature.Throws:
generateUserDelegationSharedAccessSignature
public String generateUserDelegationSharedAccessSignature(final UserDelegationKey delegationKey, final SharedAccessBlobPolicy policy, final SharedAccessBlobHeaders headers, final IPRange ipRange, final SharedAccessProtocols protocols)
Returns a shared access signature based on a user delegation key for the blob using the specified group policy identifier and operation context. Note this does not contain the leading "?".
Parameters:
UserDelegationKey
representing the key used to sign this signature.
SharedAccessPolicy
object that represents the access policy for the shared access signature.
SharedAccessBlobHeaders
object that represents the optional header values to set for a blob accessed with this shared access signature.
Returns:
String
that represents the shared access signature.Throws:
generateUserDelegationSharedAccessSignature
public String generateUserDelegationSharedAccessSignature(UserDelegationKey delegationKey, SharedAccessBlobPolicy policy)
Returns a shared access signature based on a user delegation key for the blob using the specified group policy identifier and operation context. Note this does not contain the leading "?".
Parameters:
UserDelegationKey
representing the key used to sign this signature.
SharedAccessPolicy
object that represents the access policy for the shared access signature.
Returns:
String
that represents the shared access signature.Throws:
getContainer
public final CloudBlobContainer getContainer()
Returns the blob's container.
Overrides:
CloudBlob.getContainer()Returns:
Throws:
getCopyState
public CopyState getCopyState()
Returns the blob's copy state.
Returns:
getMetadata
public final HashMap
Returns the metadata for the blob.
Returns:
java.util.HashMap
object that represents the metadata for the blob.getName
public final String getName()
Returns the name of the blob.
Returns:
String
that represents the name of the blob.getParent
public final CloudBlobDirectory getParent()
Returns the blob item's parent.
Overrides:
CloudBlob.getParent()Returns:
Throws:
getParentNameFromURI
protected static String getParentNameFromURI(final StorageUri resourceAddress, final String delimiter, final CloudBlobContainer container)
Retrieves the parent name for a blob URI.
Parameters:
String
which specifies the directory delimiter to use.
Returns:
String
which represents the parent address for a blob URI.Throws:
getProperties
public final BlobProperties getProperties()
Returns the blob's properties.
Returns:
getQualifiedStorageUri
public final StorageUri getQualifiedStorageUri()
Returns the snapshot and/or shared access signature qualified URI for this blob.
<xreftitle>Deprecated</xreftitle>
<xrefdescription>
<p>use <xref uid="com.microsoft.azure.storage.blob.CloudBlob.getSnapshotQualifiedStorageUri()" data-throw-if-not-resolved="false" data-raw-source="getSnapshotQualifiedStorageUri()"></xref> instead.</p>
</xrefdescription>
Returns:
Throws:
getQualifiedUri
public final URI getQualifiedUri()
Returns the snapshot or shared access signature qualified URI for this blob.
<xreftitle>Deprecated</xreftitle>
<xrefdescription>
<p>use <xref uid="com.microsoft.azure.storage.blob.CloudBlob.getSnapshotQualifiedUri()" data-throw-if-not-resolved="false" data-raw-source="getSnapshotQualifiedUri()"></xref> instead.</p>
</xrefdescription>
Returns:
java.net.URI
object that represents the snapshot or shared access signature.Throws:
getServiceClient
public final CloudBlobClient getServiceClient()
Returns the Blob service client associated with the blob.
Returns:
getSnapshotID
public final String getSnapshotID()
Gets the Blob Snapshot ID.
Returns:
String
which represents the Blob Snapshot ID.getSnapshotQualifiedStorageUri
public final StorageUri getSnapshotQualifiedStorageUri()
Returns the blob's URI for both the primary and secondary locations, including query string information if the blob is a snapshot.
Returns:
Throws:
getSnapshotQualifiedUri
public final URI getSnapshotQualifiedUri()
Returns the absolute URI to the blob, including query string information if the blob is a snapshot.
Returns:
java.net.URI
object specifying the absolute URI to the blob, including snapshot query information if the blob is a snapshot.Throws:
getStorageUri
public final StorageUri getStorageUri()
Returns the list of URIs for all locations.
Overrides:
CloudBlob.getStorageUri()Returns:
getStreamMinimumReadSizeInBytes
public final int getStreamMinimumReadSizeInBytes()
Returns the minimum read size when using a BlobInputStream.
Returns:
int
which represents the minimum read size, in bytes, when using a BlobInputStream object.getStreamWriteSizeInBytes
public final int getStreamWriteSizeInBytes()
Gets the number of bytes to buffer when writing to a BlobOutputStream (block and page blobs).
Returns:
int
which represents the number of bytes to buffer or the size of a block, in bytes.getTransformedAddress
protected final StorageUri getTransformedAddress(final OperationContext opContext)
Returns the transformed URI for the resource if the given credentials require transformation.
Parameters:
Returns:
Throws:
getUri
public final URI getUri()
Returns the URI for this blob.
Overrides:
CloudBlob.getUri()Returns:
java.net.URI
object that represents the URI for the blob.isSnapshot
public final boolean isSnapshot()
Indicates whether this blob is a snapshot.
Returns:
true
if the blob is a snapshot, otherwise false
.
openInputStream
public final BlobInputStream openInputStream()
Opens a blob input stream to download the blob.
Use setStreamMinimumReadSizeInBytes(final int minimumReadSize) to configure the read size.
Returns:
InputStream
object that represents the stream to use for reading from the blob.Throws:
openInputStream
public final BlobInputStream openInputStream(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Opens a blob input stream to download the blob using the specified request options and operation context.
Use setStreamMinimumReadSizeInBytes(final int minimumReadSize) to configure the read size.
Parameters:
null
will use the default request options from the associated service client ( CloudBlobClient).
Returns:
InputStream
object that represents the stream to use for reading from the blob.Throws:
openInputStream
public final BlobInputStream openInputStream(final long offset, final Long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Opens a blob input stream to download the blob using the specified request options and operation context. If the blob is decrypted as it is downloaded, the final MD5 validation will be skipped.
Use setStreamMinimumReadSizeInBytes(final int minimumReadSize) to configure the read size.
Parameters:
long
which represents the offset to use as the starting point for the source.
null
.
null
will use the default request options from the associated service client ( CloudBlobClient).
Returns:
InputStream
object that represents the stream to use for reading from the blob.Throws:
releaseLease
public final void releaseLease(final AccessCondition accessCondition)
Releases the lease on the blob.
Parameters:
Throws:
releaseLease
public final void releaseLease(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Releases the lease on the blob using the specified request options and operation context.
Parameters:
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
renewLease
public final void renewLease(final AccessCondition accessCondition)
Renews an existing lease.
Parameters:
Throws:
renewLease
public final void renewLease(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Renews an existing lease using the specified request options and operation context.
Parameters:
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
setContainer
protected final void setContainer(final CloudBlobContainer container)
Sets the container for the blob.
Parameters:
setMetadata
public final void setMetadata(final HashMap
Sets the metadata for the blob.
Parameters:
java.util.HashMap
object that contains the metadata being assigned to the blob.
setProperties
protected final void setProperties(final BlobProperties properties)
Sets the properties for the blob.
Parameters:
setSnapshotID
protected final void setSnapshotID(final String snapshotID)
Sets the blob snapshot ID.
Parameters:
String
that represents the snapshot ID being assigned to the blob.
setStorageUri
protected void setStorageUri(final StorageUri storageUri)
Sets the list of URIs for all locations.
Parameters:
setStreamMinimumReadSizeInBytes
public void setStreamMinimumReadSizeInBytes(final int minimumReadSize)
Sets the minimum read size when using a BlobInputStream.
Parameters:
int
that represents the minimum block size, in bytes, for reading from a blob while using a BlobInputStream object. Must be greater than or equal to 16 KB.
Throws:
minimumReadSize
is less than 16 KB.
setStreamWriteSizeInBytes
public abstract void setStreamWriteSizeInBytes(int streamWriteSizeInBytes)
Sets the number of bytes to buffer when writing to a BlobOutputStream (block and page blobs).
Parameters:
int
that represents the number of bytes to buffer or the size of a block, in bytes.
startCopy
public final String startCopy(final URI source)
Requests the service to start copying a URI's contents, properties, and metadata to a new blob.
Parameters:
java.net.URI
The source URI. URIs for resources outside of Azure may only be copied into block blobs.
Returns:
String
which represents the copy ID associated with the copy operation.Throws:
startCopy
public final String startCopy(final URI source, final AccessCondition sourceAccessCondition, final AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext)
Requests the service to start copying a URI's contents, properties, and metadata to a new blob, using the specified access conditions, lease ID, request options, and operation context.
Parameters:
java.net.URI
The source URI. URIs for resources outside of Azure may only be copied into block blobs.
null
will use the default request options from the associated service client (CloudBlobClient).
Returns:
String
which represents the copy ID associated with the copy operation.Throws:
startCopy
protected final String startCopy(final URI source, final String blobTierString, final AccessCondition sourceAccessCondition, final AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext)
Requests the service to start copying a URI's contents, properties, and metadata to a new blob, using the specified premium page blob tier, access conditions, lease ID, request options, and operation context.
Note: Setting the premiumPageBlobTier is only supported for premium accounts.
Parameters:
java.net.URI
The source URI. URIs for resources outside of Azure may only be copied into block blobs.
null
will use the default request options from the associated service client (CloudBlobClient).
Returns:
String
which represents the copy ID associated with the copy operation.Throws:
startCopy
protected final String startCopy(final URI source, String contentMd5, boolean syncCopy, final String blobTierString, final AccessCondition sourceAccessCondition, final AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext)
Requests the service to start copying a URI's contents, properties, and metadata to a new blob, using the specified premium page blob tier, access conditions, lease ID, request options, and operation context.
Note: Setting the premiumPageBlobTier is only supported for premium accounts.
Parameters:
java.net.URI
The source URI. URIs for resources outside of Azure may only be copied into block blobs.
null
or empty.
boolean
which indicates if the copy should be done synchronously on the service.
null
will use the default request options from the associated service client (CloudBlobClient).
Returns:
String
which represents the copy ID associated with the copy operation.Throws:
startCopy
protected final String startCopy(final URI source, String contentMd5, boolean syncCopy, final String blobTierString, final RehydratePriority rehydratePriority, final AccessCondition sourceAccessCondition, final AccessCondition destinationAccessCondition, BlobRequestOptions options, OperationContext opContext)
Requests the service to start copying a URI's contents, properties, and metadata to a new blob, using the specified premium page blob tier, rehydrate priority, access conditions, lease ID, request options, and operation context.
Note: Setting the premiumPageBlobTier is only supported for premium accounts.
Parameters:
java.net.URI
The source URI. URIs for resources outside of Azure may only be copied into block blobs.
null
or empty.
boolean
which indicates if the copy should be done synchronously on the service.
String
object which represents the tier of the blob.
null
will use the default request options from the associated service client (CloudBlobClient).
Returns:
String
which represents the copy ID associated with the copy operation.Throws:
startCopyImpl
protected StorageRequest
Parameters:
undelete
public final void undelete()
Un-deletes a blob and all its snapshots that have been soft-deleted.
Throws:
undelete
public final void undelete(BlobRequestOptions options, OperationContext opContext)
Un-deletes a blob that has been soft-deleted, using the specified request options, and operation context.
The un-delete Blob operation restores the contents and metadata of soft deleted blob and all its snapshots. Attempting to undelete a blob or snapshot that is not soft deleted will succeed without any changes.
Parameters:
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
updateEtagAndLastModifiedFromResponse
protected void updateEtagAndLastModifiedFromResponse(HttpURLConnection request)
Parameters:
updateLengthFromResponse
protected void updateLengthFromResponse(HttpURLConnection request)
Parameters:
upload
public abstract void upload(InputStream sourceStream, long length)
Uploads the source stream data to the blob. If the blob already exists on the service, it will be overwritten.
Parameters:
InputStream
object that represents the source stream to upload.
long
that represents the length of the stream data in bytes, or -1 if unknown. The length must be greater than zero and a multiple of 512 for page blobs.
Throws:
upload
public abstract void upload(InputStream sourceStream, long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Uploads the source stream data to the blob using the specified lease ID, request options, and operation context. If the blob already exists on the service, it will be overwritten.
Parameters:
InputStream
object that represents the source stream to upload.
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
uploadFromByteArray
public void uploadFromByteArray(final byte[] buffer, final int offset, final int length)
Uploads a blob from data in a byte array. If the blob already exists on the service, it will be overwritten.
Parameters:
byte
array which represents the data to write to the blob.
int
which represents the offset of the byte array from which to start the data upload.
int
which represents the number of bytes to upload from the input buffer.
Throws:
uploadFromByteArray
public void uploadFromByteArray(final byte[] buffer, final int offset, final int length, 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.
Parameters:
byte
array which represents the data to write to the blob.
int
which represents the offset of the byte array from which to start the data upload.
int
which represents the number of bytes to upload from the input buffer.
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
uploadFromFile
public void uploadFromFile(final String path)
Uploads a blob from a file. If the blob already exists on the service, it will be overwritten.
Parameters:
String
which represents the path to the file to be uploaded.
Throws:
uploadFromFile
public void uploadFromFile(final String path, 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.
Parameters:
String
which represents the path to the file to be uploaded.
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
uploadMetadata
public final void uploadMetadata()
Uploads the blob's metadata to the storage service.
Use downloadAttributes() to retrieve the latest values for the blob's properties and metadata from the Microsoft Azure storage service.
Throws:
uploadMetadata
public final void uploadMetadata(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Uploads the blob's metadata to the storage service using the specified lease ID, request options, and operation context.
Use downloadAttributes() to retrieve the latest values for the blob's properties and metadata from the Microsoft Azure storage service.
Parameters:
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
uploadProperties
public final void uploadProperties()
Updates the blob's properties to the storage service.
Use downloadAttributes() to retrieve the latest values for the blob's properties and metadata from the Microsoft Azure storage service.
Throws:
uploadProperties
public final void uploadProperties(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Updates the blob's properties using the specified lease ID, request options, and operation context.
Use downloadAttributes() to retrieve the latest values for the blob's properties and metadata from the Microsoft Azure storage service.
Parameters:
null
will use the default request options from the associated service client ( CloudBlobClient).
Throws:
validateCPKHeaders
protected static static
If the request options contain a CPK, validate the associated response headers.
Parameters:
Throws:
Applies to
Azure SDK for Java