Package org.nuxeo.ecm.core.blob
Interface ManagedBlob
-
- All Superinterfaces:
Blob
- All Known Implementing Classes:
BinaryBlob
,SimpleManagedBlob
public interface ManagedBlob extends Blob
Interface forBlob
s created and managed by theBlobManager
.- Since:
- 7.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default File
getFile()
If this blob is backed by an actual file, returns it.String
getKey()
Gets the stored representation of this blob.String
getProviderId()
Gets the id of theBlobProvider
managing this blob.default InputStream
getStream()
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 Detail
-
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
default InputStream getStream() throws IOException
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
-
-