Package org.nuxeo.ecm.core.blob.binary
Class Binary
- java.lang.Object
-
- org.nuxeo.ecm.core.blob.binary.Binary
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
GridFSBinaryManager.GridFSBinary,LazyBinary
public class Binary extends Object implements Serializable
A binary object that can be read, and has a length and a digest.- Author:
- Florent Guillaume, Bogdan Stefanescu
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBlobProviderId()Gets the blob provider which created this blob.StringgetDigest()Gets a string representation of the hex digest of the binary.StringgetDigestAlgorithm()Gets the digest algorithm from the digest length.FilegetFile()InputStreamgetStream()Gets an input stream for the binary.protected FilerecomputeFile()Recomputes the file attribute by getting it from a new Binary for the same digest.StringtoString()
-
-
-
Method Detail
-
getDigestAlgorithm
public String getDigestAlgorithm()
Gets the digest algorithm from the digest length.- Since:
- 7.4
-
getDigest
public String getDigest()
Gets a string representation of the hex digest of the binary.- Returns:
- the digest, characters are in the range
[0-9a-f]
-
getBlobProviderId
public String getBlobProviderId()
Gets the blob provider which created this blob.This is usually the repository name.
- Returns:
- the blob provider id
- Since:
- 7.3
-
getStream
public InputStream getStream() throws IOException
Gets an input stream for the binary.- Returns:
- the input stream
- Throws:
IOException
-
getFile
public File getFile()
-
recomputeFile
protected File recomputeFile()
Recomputes the file attribute by getting it from a new Binary for the same digest.
-
-