Package org.nuxeo.ecm.core.blob
Interface ManagedBlob
- All Superinterfaces:
Blob
- All Known Implementing Classes:
BinaryBlob,SimpleManagedBlob
Interface for
Blobs created and managed by the BlobManager.- Since:
- 7.2
-
Method Summary
Modifier and TypeMethodDescriptiondefault FilegetFile()If this blob is backed by an actual file, returns it.getKey()Gets the stored representation of this blob.Gets the id of theBlobProvidermanaging this blob.default InputStreamGets anInputStreamfor the data of this blob.Methods inherited from interface org.nuxeo.ecm.core.api.Blob
getByteArray, getCloseableFile, getCloseableFile, getDigest, getDigestAlgorithm, getEncoding, getFilename, getLength, getMimeType, getString, setDigest, setDigestAlgorithm, setEncoding, setFilename, setMimeType, transferTo, transferTo
-
Method Details
-
getProviderId
String getProviderId()Gets the id of theBlobProvidermanaging this blob.- Returns:
- the blob provider id
-
getKey
String getKey()Gets the stored representation of this blob.- Returns:
- the stored representation
-
getStream
Description copied from interface:BlobGets anInputStreamfor the data of this blob.The contract of
Blobis that this method can be called several times and will correctly return a newInputStreameach time. In other words, several reads of theBlobcan be done.Like all
InputStream, the result must be closed when done with it to avoid resource leaks.- Specified by:
getStreamin interfaceBlob- Returns:
- the stream
- Throws:
IOException
-
getFile
Description copied from interface:BlobIf this blob is backed by an actual file, returns it.The returned file may be short-lived (temporary), so should be used immediately.
-