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.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 java.lang.String
getContentIdentity()
@NotNull java.io.InputStream
getNewStream()
Delegates toBinary.getStream()
and returns an input stream the always throws anIOException
if the underlying binary failed to produce one.java.lang.String
getReference()
long
length()
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 anIOException
if the underlying binary failed to produce one.- Specified by:
getNewStream
in interfaceorg.apache.jackrabbit.oak.api.Blob
-
length
public long length()
Delegates toBinary.getSize()
and returns -1 if that fails.- Specified by:
length
in interfaceorg.apache.jackrabbit.oak.api.Blob
-
getReference
public java.lang.String getReference()
- Specified by:
getReference
in interfaceorg.apache.jackrabbit.oak.api.Blob
- Returns:
null
-
getContentIdentity
public java.lang.String getContentIdentity()
- Specified by:
getContentIdentity
in interfaceorg.apache.jackrabbit.oak.api.Blob
- Returns:
null
-
-