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

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

  • Constructor Details

    • BinaryBasedBlob

      public BinaryBasedBlob(Binary binary)
  • Method Details

    • getNewStream

      @NotNull public @NotNull 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 String getReference()
      Specified by:
      getReference in interface org.apache.jackrabbit.oak.api.Blob
      Returns:
      null
    • getContentIdentity

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