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 java.lang.Object implements org.apache.jackrabbit.oak.api.BlobThis 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 java.lang.StringgetContentIdentity()@NotNull java.io.InputStreamgetNewStream()Delegates toBinary.getStream()and returns an input stream the always throws anIOExceptionif the underlying binary failed to produce one.java.lang.StringgetReference()longlength()Delegates toBinary.getSize()and returns -1 if that fails.
-
-
-
Constructor Detail
-
BinaryBasedBlob
public BinaryBasedBlob(Binary binary)
-
-
Method Detail
-
getNewStream
@NotNull public @NotNull java.io.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 java.lang.String getReference()
- Specified by:
getReferencein interfaceorg.apache.jackrabbit.oak.api.Blob- Returns:
null
-
getContentIdentity
public java.lang.String getContentIdentity()
- Specified by:
getContentIdentityin interfaceorg.apache.jackrabbit.oak.api.Blob- Returns:
null
-
-