Class ArrayBasedBlob
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.memory.AbstractBlob
-
- org.apache.jackrabbit.oak.plugins.memory.ArrayBasedBlob
-
- All Implemented Interfaces:
Blob
public class ArrayBasedBlob extends AbstractBlob
ThisBlob
implementations is based on an array of bytes.
-
-
Constructor Summary
Constructors Constructor Description ArrayBasedBlob(byte[] value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull java.io.InputStream
getNewStream()
Returns a new stream for this blob.long
length()
Returns the length of this blob or -1 if unknown.-
Methods inherited from class org.apache.jackrabbit.oak.plugins.memory.AbstractBlob
calculateSha256, equal, equals, getContentIdentity, getReference, hashCode, toString
-
-
-
-
Method Detail
-
getNewStream
@NotNull public @NotNull java.io.InputStream getNewStream()
Description copied from interface:Blob
Returns a new stream for this blob. The streams returned from multiple calls to this method are byte wise equals. That is, subsequent calls toread
return the same sequence of bytes as long as neither call throws an exception.- Returns:
- a new stream for this blob
-
length
public long length()
Description copied from interface:Blob
Returns the length of this blob or -1 if unknown.- Returns:
- the length of this blob.
-
-