Class BinaryBasedBlob
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.value.BinaryBasedBlob
-
- All Implemented Interfaces:
org.apache.jackrabbit.oak.api.Blob
public class BinaryBasedBlob extends Object implements org.apache.jackrabbit.oak.api.Blob
This Blob implementation is based on an underlyingBinary.Any error accessing the underlying binary in
getNewStream()will be deferred to the returned input stream.
-
-
Constructor Summary
Constructors Constructor Description BinaryBasedBlob(Binary binary)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContentIdentity()@NotNull InputStreamgetNewStream()Delegates toBinary.getStream()and returns an input stream the always throws anIOExceptionif the underlying binary failed to produce one.StringgetReference()longlength()Delegates toBinary.getSize()and returns -1 if that fails.
-
-
-
Constructor Detail
-
BinaryBasedBlob
public BinaryBasedBlob(Binary binary)
-
-
Method Detail
-
getNewStream
@NotNull public @NotNull InputStream getNewStream()
Delegates toBinary.getStream()and returns an input stream the always throws anIOExceptionif the underlying binary failed to produce one.- Specified by:
getNewStreamin interfaceorg.apache.jackrabbit.oak.api.Blob
-
length
public long length()
Delegates toBinary.getSize()and returns -1 if that fails.- Specified by:
lengthin interfaceorg.apache.jackrabbit.oak.api.Blob
-
getReference
public String getReference()
- Specified by:
getReferencein interfaceorg.apache.jackrabbit.oak.api.Blob- Returns:
null
-
getContentIdentity
public String getContentIdentity()
- Specified by:
getContentIdentityin interfaceorg.apache.jackrabbit.oak.api.Blob- Returns:
null
-
-