Package org.nuxeo.ecm.core.blob
Interface ManagedBlob
- All Superinterfaces:
Blob
- All Known Implementing Classes:
BinaryBlob
,SimpleManagedBlob
Interface for
Blob
s created and managed by the BlobManager
.- Since:
- 7.2
-
Method Summary
Modifier and TypeMethodDescriptiondefault File
getFile()
If this blob is backed by an actual file, returns it.getKey()
Gets the stored representation of this blob.Gets the id of theBlobProvider
managing this blob.default InputStream
Gets anInputStream
for 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 theBlobProvider
managing 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:Blob
Gets anInputStream
for the data of this blob.The contract of
Blob
is that this method can be called several times and will correctly return a newInputStream
each time. In other words, several reads of theBlob
can be done.Like all
InputStream
, the result must be closed when done with it to avoid resource leaks.- Specified by:
getStream
in interfaceBlob
- Returns:
- the stream
- Throws:
IOException
-
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.
-