Package org.nuxeo.ecm.core.blob
Class SimpleManagedBlob
java.lang.Object
org.nuxeo.ecm.core.api.impl.blob.AbstractBlob
org.nuxeo.ecm.core.blob.SimpleManagedBlob
- All Implemented Interfaces:
Serializable,Blob,ManagedBlob
Simple managed blob implementation holding just a key and delegating to its provider for implementation.
- Since:
- 7.2
- See Also:
-
Field Summary
FieldsFields inherited from class org.nuxeo.ecm.core.api.impl.blob.AbstractBlob
digest, digestAlgorithm, encoding, filename, mimeType, TEXT_PLAIN, UTF_8 -
Constructor Summary
ConstructorsConstructorDescriptionSimpleManagedBlob(String blobProviderId, BlobInfo blobInfo) SimpleManagedBlob(BlobInfo blobInfo) -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringgetFile()If this blob is backed by an actual file, returns it.getKey()Gets the stored representation of this blob.longGets the data length in bytes if known.Gets the id of theBlobProvidermanaging this blob.withKeyAndDigest(String newKey, String newDigest) Returns a copy of this blob with a new key and digest.Methods inherited from class org.nuxeo.ecm.core.api.impl.blob.AbstractBlob
equals, equalsStream, getByteArray, getCloseableFile, getCloseableFile, getDigest, getDigestAlgorithm, getEncoding, getFilename, getMimeType, getString, hashCode, setDigest, setDigestAlgorithm, setEncoding, setFilename, setMimeType, transferTo, transferToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.ecm.core.api.Blob
getByteArray, getCloseableFile, getCloseableFile, getDigest, getDigestAlgorithm, getEncoding, getFilename, getMimeType, getString, setDigest, setDigestAlgorithm, setEncoding, setFilename, setMimeType, transferTo, transferToMethods inherited from interface org.nuxeo.ecm.core.blob.ManagedBlob
getStream
-
Field Details
-
blobProviderId
-
key
-
length
-
-
Constructor Details
-
SimpleManagedBlob
-
SimpleManagedBlob
-
-
Method Details
-
withKeyAndDigest
Returns a copy of this blob with a new key and digest.- Since:
- 11.5
-
getProviderId
Description copied from interface:ManagedBlobGets the id of theBlobProvidermanaging this blob.- Specified by:
getProviderIdin interfaceManagedBlob- Returns:
- the blob provider id
-
getKey
Description copied from interface:ManagedBlobGets the stored representation of this blob.- Specified by:
getKeyin interfaceManagedBlob- Returns:
- the stored representation
-
blobProviderIdFromKey
-
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.
- Specified by:
getFilein interfaceBlob- Specified by:
getFilein interfaceManagedBlob- Overrides:
getFilein classAbstractBlob- Returns:
- a file, or
nullif the blob is not backed by a file
-
getLength
public long getLength()Description copied from interface:BlobGets the data length in bytes if known.- Specified by:
getLengthin interfaceBlob- Overrides:
getLengthin classAbstractBlob- Returns:
- the data length or -1 if not known
-