BlobProperties Class

  • java.lang.Object
    • com.microsoft.azure.storage.blob.BlobProperties

public class BlobProperties

Represents the system properties for a blob.

Constructor Summary

Constructor Description
BlobProperties()

Creates an instance of the class.

BlobProperties(final BlobProperties other)

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

BlobProperties(final BlobType type)

Creates an instance of the class.

Method Summary

Modifier and Type Method and Description
Integer getAppendBlobCommittedBlockCount()

If the blob is an append blob, gets the number of committed blocks.

BlobType getBlobType()

Gets the blob type for the blob.

String getCacheControl()

Gets the cache control value for the blob.

String getContentDisposition()

Gets the content disposition value for the blob.

String getContentEncoding()

Gets the content encoding value for the blob.

String getContentLanguage()

Gets the content language value for the blob.

String getContentMD5()

Gets the content MD5 value for the blob.

String getContentType()

Gets the content type value for the blob.

CopyState getCopyState()

Gets the blob's copy state.

Date getCreatedTime()

Gets the time when the blob was created.

Date getDeletedTime()

Gets the time when the blob was deleted.

String getEtag()

Gets the ETag value for the blob.

The ETag value is a unique identifier that is updated when a write operation is performed against the container. It may be used to perform operations conditionally, providing concurrency control and improved efficiency.

The generateIfMatchCondition(final String etag) and generateIfNoneMatchCondition(final String etag) methods take an ETag value and return an AccessCondition object that may be specified on the request.

Date getLastModified()

Gets the last modified time for the blob.

LeaseDuration getLeaseDuration()

Gets the lease duration for the blob.

LeaseState getLeaseState()

Gets the lease state for the blob.

LeaseStatus getLeaseStatus()

Gets the lease status for the blob.

long getLength()

Gets the size, in bytes, of the blob.

Long getPageBlobSequenceNumber()

If the blob is a page blob, gets the page blob's current sequence number.

PremiumPageBlobTier getPremiumPageBlobTier()

If using a premium account and the blob is a page blob, gets the tier of the blob.

RehydrationStatus getRehydrationStatus()

The rehydration status if the blob is being rehydrated and the tier of the blob once the rehydration from archive has completed.

Integer getRemainingRetentionDays()

Gets the number of days that the deleted blob will be kept by the service.

StandardBlobTier getStandardBlobTier()

If using a standard account and the blob is a block blob, gets the tier of the blob.

Date getTierChangeTime()

Gets a value indicating the last time the tier was changed on the blob.

Boolean isBlobTierInferred()

Gets a value indicating if the tier of the blob has been inferred.

boolean isIncrementalCopy()

Gets if the blob is an incremental copy

boolean isServerEncrypted()

Gets the blob's server-side encryption status;

void setAppendBlobCommittedBlockCount(final Integer appendBlobCommittedBlockCount)

If the blob is an append blob, sets the number of committed blocks.

void setBlobTierInferred(Boolean isBlobTierInferredTier)

Sets whether the blob tier is inferred.

void setBlobType(final BlobType blobType)

Sets the blob type.

void setCacheControl(final String cacheControl)

Sets the cache control value for the blob.

void setContentDisposition(final String contentDisposition)

Sets the content disposition value for the blob.

void setContentEncoding(final String contentEncoding)

Sets the content encoding value for the blob.

void setContentLanguage(final String contentLanguage)

Sets the content language for the blob.

void setContentMD5(final String contentMD5)

Sets the content MD5 value for the blob.

void setContentType(final String contentType)

Sets the content type value for the blob.

void setCopyState(final CopyState copyState)

Sets the copy state value for the blob

void setCreatedTime(final Date createdTime)

Sets the createdTime value for the blob

void setDeletedTime(Date deletedTime)

Sets the time when the blob was deleted.

void setEtag(final String etag)

Sets the ETag value for the blob.

void setIncrementalCopy(boolean isIncrementalCopy)

Sets whether the blob is an incremental copy.

void setLastModified(final Date lastModified)

Sets the last modified time for the blob.

void setLeaseDuration(final LeaseDuration leaseDuration)

Sets the lease duration for the blob.

void setLeaseState(final LeaseState leaseState)

Sets the lease state for the blob.

void setLeaseStatus(final LeaseStatus leaseStatus)

Sets the lease status for the blob.

void setLength(final long length)

Sets the content length, in bytes, for the blob.

void setPageBlobSequenceNumber(final Long pageBlobSequenceNumber)

If the blob is a page blob, sets the blob's current sequence number.

void setPremiumPageBlobTier(PremiumPageBlobTier premiumPageBlobTier)

Sets the tier of the page blob. This is only supported for premium accounts.

void setRehydrationStatus(RehydrationStatus rehydrationStatus)

Sets the rehydration status of the blob.

void setRemainingRetentionDays(Integer remainingRetentionDays)

Sets the number days that the deleted blob will be kept by the service.

void setServerEncrypted(boolean serverEncrypted)

Sets the blob's server-side encryption status.

void setStandardBlobTier(StandardBlobTier standardBlobTier)

Sets the tier of the block blob. This is only supported for standard storage accounts.

void setTierChangeTime(Date tierChangeTime)

Sets the last time the tier was modified on the blob.

Constructor Details

BlobProperties

public BlobProperties()

Creates an instance of the class.

BlobProperties

public BlobProperties(final BlobProperties other)

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

Parameters:

other - A BlobProperties object which represents the blob properties to copy.

BlobProperties

public BlobProperties(final BlobType type)

Creates an instance of the class.

Parameters:

type - A BlobType object which represents the blob type.

Method Details

getAppendBlobCommittedBlockCount

public Integer getAppendBlobCommittedBlockCount()

If the blob is an append blob, gets the number of committed blocks.

Returns:

A Integer value that represents the number of committed blocks.

getBlobType

public BlobType getBlobType()

Gets the blob type for the blob.

Returns:

A BlobType value that represents the blob type.

getCacheControl

public String getCacheControl()

Gets the cache control value for the blob.

Returns:

A String which represents the content cache control value for the blob.

getContentDisposition

public String getContentDisposition()

Gets the content disposition value for the blob.

Returns:

A String which represents the content disposition, or null if content disposition has not been set on the blob.

getContentEncoding

public String getContentEncoding()

Gets the content encoding value for the blob.

Returns:

A String which represents the content encoding, or null if content encoding has not been set on the blob.

getContentLanguage

public String getContentLanguage()

Gets the content language value for the blob.

Returns:

A String which represents the content language, or null if content language has not been set on the blob.

getContentMD5

public String getContentMD5()

Gets the content MD5 value for the blob.

Returns:

A String which represents the content MD5 value.

getContentType

public String getContentType()

Gets the content type value for the blob.

Returns:

A String which represents the content type, or null if the content type has not be set for the blob.

getCopyState

public CopyState getCopyState()

Gets the blob's copy state.

Returns:

A CopyState object which represents the copy state of the blob.

getCreatedTime

public Date getCreatedTime()

Gets the time when the blob was created.

Returns:

A java.util.Date object which represents the time when the blob was created.

getDeletedTime

public Date getDeletedTime()

Gets the time when the blob was deleted.

Returns:

A java.util.Date object which represents the time when the blob was deleted. It returns null if the blob has not been deleted.

getEtag

public String getEtag()

Gets the ETag value for the blob.

The ETag value is a unique identifier that is updated when a write operation is performed against the container. It may be used to perform operations conditionally, providing concurrency control and improved efficiency.

The generateIfMatchCondition(final String etag) and generateIfNoneMatchCondition(final String etag) methods take an ETag value and return an AccessCondition object that may be specified on the request.

Returns:

A String which represents the ETag value.

getLastModified

public Date getLastModified()

Gets the last modified time for the blob.

Returns:

A java.util.Date object which represents the last modified time.

getLeaseDuration

public LeaseDuration getLeaseDuration()

Gets the lease duration for the blob.

Returns:

A LeaseDuration object which represents the lease duration.

getLeaseState

public LeaseState getLeaseState()

Gets the lease state for the blob.

Returns:

A LeaseState object which represents the lease state.

getLeaseStatus

public LeaseStatus getLeaseStatus()

Gets the lease status for the blob.

Returns:

A LeaseStatus object which represents the lease status.

getLength

public long getLength()

Gets the size, in bytes, of the blob.

Returns:

A long which represents the length of the blob.

getPageBlobSequenceNumber

public Long getPageBlobSequenceNumber()

If the blob is a page blob, gets the page blob's current sequence number.

Returns:

A Long containing the page blob's current sequence number.

getPremiumPageBlobTier

public PremiumPageBlobTier getPremiumPageBlobTier()

If using a premium account and the blob is a page blob, gets the tier of the blob.

Returns:

A PremiumPageBlobTier object which represents the tier of the blob or null if the tier has not been set.

getRehydrationStatus

public RehydrationStatus getRehydrationStatus()

The rehydration status if the blob is being rehydrated and the tier of the blob once the rehydration from archive has completed.

getRemainingRetentionDays

public Integer getRemainingRetentionDays()

Gets the number of days that the deleted blob will be kept by the service.

Returns:

A Integer value that represents the number of days that the deleted blob will be kept by the service.

getStandardBlobTier

public StandardBlobTier getStandardBlobTier()

If using a standard account and the blob is a block blob, gets the tier of the blob.

Returns:

A StandardBlobTier object which represents the tier of the blob or null if the tier has not been set.

getTierChangeTime

public Date getTierChangeTime()

Gets a value indicating the last time the tier was changed on the blob.

Returns:

A java.util.Date object which represents the last time the tier was changed.

isBlobTierInferred

public Boolean isBlobTierInferred()

Gets a value indicating if the tier of the blob has been inferred.

Returns:

A java.lang.Boolean object which represents if the blob tier was inferred.

isIncrementalCopy

public boolean isIncrementalCopy()

Gets if the blob is an incremental copy

Returns:

A boolean which specifies if the blob is an incremental copy.

isServerEncrypted

public boolean isServerEncrypted()

Gets the blob's server-side encryption status;

Returns:

A boolean which specifies the blob's encryption status.

setAppendBlobCommittedBlockCount

protected void setAppendBlobCommittedBlockCount(final Integer appendBlobCommittedBlockCount)

If the blob is an append blob, sets the number of committed blocks.

Parameters:

appendBlobCommittedBlockCount - A Integer value that represents the number of committed blocks.

setBlobTierInferred

protected void setBlobTierInferred(Boolean isBlobTierInferredTier)

Sets whether the blob tier is inferred.

Parameters:

isBlobTierInferredTier - A java.lang.Boolean which specifies if the blob tier is inferred.

setBlobType

protected void setBlobType(final BlobType blobType)

Sets the blob type.

Parameters:

blobType - A BlobType object which specifies the blob type to set.

setCacheControl

public void setCacheControl(final String cacheControl)

Sets the cache control value for the blob.

Parameters:

cacheControl - A String which specifies the cache control value to set.

setContentDisposition

public void setContentDisposition(final String contentDisposition)

Sets the content disposition value for the blob.

Parameters:

contentDisposition - A String which specifies the content disposition value to set.

setContentEncoding

public void setContentEncoding(final String contentEncoding)

Sets the content encoding value for the blob.

Parameters:

contentEncoding - A String which specifies the content encoding value to set.

setContentLanguage

public void setContentLanguage(final String contentLanguage)

Sets the content language for the blob.

Parameters:

contentLanguage - A String which specifies the content language value to set.

setContentMD5

public void setContentMD5(final String contentMD5)

Sets the content MD5 value for the blob.

Parameters:

contentMD5 - A String which specifies the content MD5 value to set.

setContentType

public void setContentType(final String contentType)

Sets the content type value for the blob.

Parameters:

contentType - A String which specifies the content type value to set.

setCopyState

protected void setCopyState(final CopyState copyState)

Sets the copy state value for the blob

Parameters:

copyState - A CopyState object which specifies the copy state value to set.

setCreatedTime

protected void setCreatedTime(final Date createdTime)

Sets the createdTime value for the blob

Parameters:

createdTime - A Date which represents the time when the blob was created.

setDeletedTime

protected void setDeletedTime(Date deletedTime)

Sets the time when the blob was deleted.

Parameters:

deletedTime - A java.util.Date object which represents the time when the blob was deleted.

setEtag

protected void setEtag(final String etag)

Sets the ETag value for the blob.

Parameters:

etag - A String which specifies the ETag value to set.

setIncrementalCopy

protected void setIncrementalCopy(boolean isIncrementalCopy)

Sets whether the blob is an incremental copy.

Parameters:

isIncrementalCopy - A boolean which specifies if the blob is an incremental copy.

setLastModified

protected void setLastModified(final Date lastModified)

Sets the last modified time for the blob.

Parameters:

lastModified - A java.util.Date object which specifies the last modified time to set.

setLeaseDuration

protected void setLeaseDuration(final LeaseDuration leaseDuration)

Sets the lease duration for the blob.

Parameters:

leaseDuration - A LeaseDuration object which specifies the lease duration value to set.

setLeaseState

protected void setLeaseState(final LeaseState leaseState)

Sets the lease state for the blob.

Parameters:

leaseState - A LeaseState object which specifies the lease state value to set.

setLeaseStatus

protected void setLeaseStatus(final LeaseStatus leaseStatus)

Sets the lease status for the blob.

Parameters:

leaseStatus - A LeaseStatus object which specifies the lease status value to set.

setLength

protected void setLength(final long length)

Sets the content length, in bytes, for the blob.

Parameters:

length - A long which specifies the length to set.

setPageBlobSequenceNumber

protected void setPageBlobSequenceNumber(final Long pageBlobSequenceNumber)

If the blob is a page blob, sets the blob's current sequence number.

Parameters:

pageBlobSequenceNumber - A long containing the blob's current sequence number.

setPremiumPageBlobTier

protected void setPremiumPageBlobTier(PremiumPageBlobTier premiumPageBlobTier)

Sets the tier of the page blob. This is only supported for premium accounts.

Parameters:

premiumPageBlobTier - A PremiumPageBlobTier object which represents the tier of the blob.

setRehydrationStatus

protected void setRehydrationStatus(RehydrationStatus rehydrationStatus)

Sets the rehydration status of the blob.

Parameters:

rehydrationStatus - A RehydrationStatus which specifies the rehydration status of the blob.

setRemainingRetentionDays

protected void setRemainingRetentionDays(Integer remainingRetentionDays)

Sets the number days that the deleted blob will be kept by the service.

Parameters:

remainingRetentionDays - A Integer value that represents the number days that the deleted blob will be kept by the service.

setServerEncrypted

protected void setServerEncrypted(boolean serverEncrypted)

Sets the blob's server-side encryption status.

Parameters:

serverEncrypted - A boolean which specifies the encryption status to set.

setStandardBlobTier

protected void setStandardBlobTier(StandardBlobTier standardBlobTier)

Sets the tier of the block blob. This is only supported for standard storage accounts.

Parameters:

standardBlobTier - A StandardBlobTier object which represents the tier of the blob.

setTierChangeTime

protected void setTierChangeTime(Date tierChangeTime)

Sets the last time the tier was modified on the blob.

Parameters:

tierChangeTime - A java.util.Date which specifies the last time the tier was modified.

Applies to