Class BlobProperties


  • public class BlobProperties
    extends java.lang.Object
    The properties of a blob that the client can set at time of put. The blob size and serviceId are mandatory fields and must be set. The creation time is determined when this object is constructed.
    • Constructor Summary

      Constructors 
      Constructor Description
      BlobProperties​(long blobSize, java.lang.String serviceId, short accountId, short containerId, boolean isEncrypted)  
      BlobProperties​(long blobSize, java.lang.String serviceId, short accountId, short containerId, boolean isEncrypted, long creationTimeInMs)  
      BlobProperties​(long blobSize, java.lang.String serviceId, java.lang.String ownerId, java.lang.String contentType, boolean isPrivate, long timeToLiveInSeconds, long creationTimeInMs, short accountId, short containerId, boolean isEncrypted, java.lang.String externalAssetTag, java.lang.String contentEncoding, java.lang.String filename)  
      BlobProperties​(long blobSize, java.lang.String serviceId, java.lang.String ownerId, java.lang.String contentType, boolean isPrivate, long timeToLiveInSeconds, short accountId, short containerId, boolean isEncrypted, java.lang.String externalAssetTag, java.lang.String contentEncoding, java.lang.String filename)  
    • Constructor Detail

      • BlobProperties

        public BlobProperties​(long blobSize,
                              java.lang.String serviceId,
                              short accountId,
                              short containerId,
                              boolean isEncrypted)
        Parameters:
        blobSize - The size of the blob in bytes
        serviceId - The service id that is creating this blob
        accountId - accountId of the user who owns the blob
        containerId - containerId of the blob
        isEncrypted - true if the blob is encrypted, false otherwise
      • BlobProperties

        public BlobProperties​(long blobSize,
                              java.lang.String serviceId,
                              short accountId,
                              short containerId,
                              boolean isEncrypted,
                              long creationTimeInMs)
        Parameters:
        blobSize - The size of the blob in bytes
        serviceId - The service id that is creating this blob
        accountId - accountId of the user who owns the blob
        containerId - containerId of the blob
        isEncrypted - true if the blob is encrypted, false otherwise
        creationTimeInMs - The time at which the blob is created.
      • BlobProperties

        public BlobProperties​(long blobSize,
                              java.lang.String serviceId,
                              java.lang.String ownerId,
                              java.lang.String contentType,
                              boolean isPrivate,
                              long timeToLiveInSeconds,
                              short accountId,
                              short containerId,
                              boolean isEncrypted,
                              java.lang.String externalAssetTag,
                              java.lang.String contentEncoding,
                              java.lang.String filename)
        Parameters:
        blobSize - The size of the blob in bytes
        serviceId - The service id that is creating this blob
        ownerId - The owner of the blob (For example , memberId or groupId)
        contentType - The content type of the blob (eg: mime). Can be Null
        isPrivate - Is the blob secure
        timeToLiveInSeconds - The time to live, in seconds, relative to blob creation time.
        accountId - accountId of the user who owns the blob
        containerId - containerId of the blob
        isEncrypted - whether this blob is encrypted.
        externalAssetTag - externalAssetTag for this blob. This is a non-persistent field.
        contentEncoding - the field to identify if the blob is compressed.
        filename - the name of the file.
      • BlobProperties

        public BlobProperties​(long blobSize,
                              java.lang.String serviceId,
                              java.lang.String ownerId,
                              java.lang.String contentType,
                              boolean isPrivate,
                              long timeToLiveInSeconds,
                              long creationTimeInMs,
                              short accountId,
                              short containerId,
                              boolean isEncrypted,
                              java.lang.String externalAssetTag,
                              java.lang.String contentEncoding,
                              java.lang.String filename)
        Parameters:
        blobSize - The size of the blob in bytes
        serviceId - The service id that is creating this blob
        ownerId - The owner of the blob (For example , memberId or groupId)
        contentType - The content type of the blob (eg: mime). Can be Null
        isPrivate - Is the blob secure
        timeToLiveInSeconds - The time to live, in seconds, relative to blob creation time.
        creationTimeInMs - The time at which the blob is created.
        accountId - accountId of the user who owns the blob
        containerId - containerId of the blob
        isEncrypted - whether this blob is encrypted.
        externalAssetTag - externalAssetTag for this blob. This is a non-persistent field.
        contentEncoding - the field to identify if the blob is compressed.
        filename - the name of the file.
    • Method Detail

      • getTimeToLiveInSeconds

        public long getTimeToLiveInSeconds()
      • getBlobSize

        public long getBlobSize()
      • isPrivate

        @Deprecated
        public boolean isPrivate()
        Deprecated.
        This should only be used to determine the "virtual container" for blobs with V1 IDs.
        Returns:
        whether the blob was private at creation time.
      • getOwnerId

        public java.lang.String getOwnerId()
      • getContentType

        public java.lang.String getContentType()
      • getContentEncoding

        public java.lang.String getContentEncoding()
      • getFilename

        public java.lang.String getFilename()
      • getServiceId

        public java.lang.String getServiceId()
        ServiceId of the uploader of the blob
        Returns:
        the serviceId of the uploader of the blob
      • getCreationTimeInMs

        public long getCreationTimeInMs()
      • getAccountId

        public short getAccountId()
      • getContainerId

        public short getContainerId()
      • isEncrypted

        public boolean isEncrypted()
      • getExternalAssetTag

        public java.lang.String getExternalAssetTag()
        Returns:
        the ExternalAssetTag of a uploaded blob. Can be null.
      • setTimeToLiveInSeconds

        public void setTimeToLiveInSeconds​(long timeToLiveInSeconds)
        Parameters:
        timeToLiveInSeconds - the new value of timeToLiveInSeconds
      • setBlobSize

        public void setBlobSize​(long blobSize)
        Parameters:
        blobSize - the new blob size in bytes
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object