Class SimpleManagedBlob

    • Field Detail

      • blobProviderId

        public final String blobProviderId
      • key

        public final String key
      • length

        public Long length
    • Constructor Detail

      • SimpleManagedBlob

        public SimpleManagedBlob​(String blobProviderId,
                                 BlobInfo blobInfo)
      • SimpleManagedBlob

        public SimpleManagedBlob​(BlobInfo blobInfo)
    • Method Detail

      • withKeyAndDigest

        public SimpleManagedBlob withKeyAndDigest​(String newKey,
                                                  String newDigest)
        Returns a copy of this blob with a new key and digest.
        Since:
        11.5
      • getKey

        public String getKey()
        Description copied from interface: ManagedBlob
        Gets the stored representation of this blob.
        Specified by:
        getKey in interface ManagedBlob
        Returns:
        the stored representation
      • blobProviderIdFromKey

        protected static String blobProviderIdFromKey​(String key)
      • getFile

        public File getFile()
        Description copied from interface: Blob
        If this blob is backed by an actual file, returns it.

        The returned file may be short-lived (temporary), so should be used immediately.

        Specified by:
        getFile in interface Blob
        Specified by:
        getFile in interface ManagedBlob
        Overrides:
        getFile in class AbstractBlob
        Returns:
        a file, or null if the blob is not backed by a file
      • getLength

        public long getLength()
        Description copied from interface: Blob
        Gets the data length in bytes if known.
        Specified by:
        getLength in interface Blob
        Overrides:
        getLength in class AbstractBlob
        Returns:
        the data length or -1 if not known