Class 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 underlying Binary.

    Any error accessing the underlying binary in getNewStream() will be deferred to the returned input stream.

    • Constructor Summary

      Constructors 
      Constructor Description
      BinaryBasedBlob​(javax.jcr.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 to Binary.getStream() and returns an input stream the always throws an IOException if the underlying binary failed to produce one.
      java.lang.String getReference()  
      long length()
      Delegates to Binary.getSize() and returns -1 if that fails.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.jackrabbit.oak.api.Blob

        isInlined
    • Constructor Detail

      • BinaryBasedBlob

        public BinaryBasedBlob​(javax.jcr.Binary binary)
    • Method Detail

      • getNewStream

        @NotNull
        public @NotNull java.io.InputStream getNewStream()
        Delegates to Binary.getStream() and returns an input stream the always throws an IOException if the underlying binary failed to produce one.
        Specified by:
        getNewStream in interface org.apache.jackrabbit.oak.api.Blob
      • length

        public long length()
        Delegates to Binary.getSize() and returns -1 if that fails.
        Specified by:
        length in interface org.apache.jackrabbit.oak.api.Blob
      • getReference

        public java.lang.String getReference()
        Specified by:
        getReference in interface org.apache.jackrabbit.oak.api.Blob
        Returns:
        null
      • getContentIdentity

        public java.lang.String getContentIdentity()
        Specified by:
        getContentIdentity in interface org.apache.jackrabbit.oak.api.Blob
        Returns:
        null