Interface ManagedBlob

All Superinterfaces:
Blob
All Known Implementing Classes:
BinaryBlob, SimpleManagedBlob

public interface ManagedBlob extends Blob
Interface for Blobs created and managed by the BlobManager.
Since:
7.2
  • Method Details

    • getProviderId

      String getProviderId()
      Gets the id of the BlobProvider managing this blob.
      Returns:
      the blob provider id
    • getKey

      String getKey()
      Gets the stored representation of this blob.
      Returns:
      the stored representation
    • getStream

      default InputStream getStream() throws IOException
      Description copied from interface: Blob
      Gets an InputStream for the data of this blob.

      The contract of Blob is that this method can be called several times and will correctly return a new InputStream each time. In other words, several reads of the Blob can be done.

      Like all InputStream, the result must be closed when done with it to avoid resource leaks.

      Specified by:
      getStream in interface Blob
      Returns:
      the stream
      Throws:
      IOException
    • getFile

      default 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
      Returns:
      a file, or null if the blob is not backed by a file