Class BinaryBlob

java.lang.Object
org.nuxeo.ecm.core.api.impl.blob.AbstractBlob
org.nuxeo.ecm.core.blob.binary.BinaryBlob
All Implemented Interfaces:
Serializable, Blob, ManagedBlob

@Deprecated(since="2023.9") public class BinaryBlob extends AbstractBlob implements ManagedBlob, Serializable
Deprecated.
since 2023.9, see ManagedBlob instead
A Blob wrapping a Binary value.
See Also:
  • Field Details

    • binary

      protected final Binary binary
      Deprecated.
    • key

      protected final String key
      Deprecated.
      The key, which is the binary's digest but may in addition be prefixed by a blob provider id.
    • length

      protected final long length
      Deprecated.
  • Constructor Details

  • Method Details

    • getLength

      public long getLength()
      Deprecated.
      Description copied from interface: Blob
      Gets the data length in bytes if known.
      Specified by:
      getLength in interface Blob
      Overrides:
      getLength in class AbstractBlob
      Returns:
      the data length or -1 if not known
    • getStream

      public InputStream getStream() throws IOException
      Deprecated.
      Description copied from interface: Blob
      Gets an InputStream for the data of this blob.

      The contract of Blob is that this method can be called several times and will correctly return a new InputStream each time. In other words, several reads of the Blob can be done.

      Like all InputStream, the result must be closed when done with it to avoid resource leaks.

      Specified by:
      getStream in interface Blob
      Specified by:
      getStream in interface ManagedBlob
      Returns:
      the stream
      Throws:
      IOException
    • getBinary

      public Binary getBinary()
      Deprecated.
      Gets the Binary attached to this blob.
      Returns:
      the binary
      Since:
      5.9.4
    • getKey

      public String getKey()
      Deprecated.
      Description copied from interface: ManagedBlob
      Gets the stored representation of this blob.
      Specified by:
      getKey in interface ManagedBlob
      Returns:
      the stored representation
    • getProviderId

      public String getProviderId()
      Deprecated.
      Description copied from interface: ManagedBlob
      Gets the id of the BlobProvider managing this blob.
      Specified by:
      getProviderId in interface ManagedBlob
      Returns:
      the blob provider id
    • getFile

      public File getFile()
      Deprecated.
      Description copied from interface: Blob
      If this blob is backed by an actual file, returns it.

      The returned file may be short-lived (temporary), so should be used immediately.

      Specified by:
      getFile in interface Blob
      Specified by:
      getFile in interface ManagedBlob
      Overrides:
      getFile in class AbstractBlob
      Returns:
      a file, or null if the blob is not backed by a file
    • equalsStream

      protected boolean equalsStream(Blob blob)
      Deprecated.
      Overrides:
      equalsStream in class AbstractBlob