public abstract class AbstractBlob extends Object implements org.apache.jackrabbit.oak.api.Blob
Blob implementations.
This base class provides default implementations for
hashCode and equals.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractBlob() |
protected |
AbstractBlob(HashCode hashCode) |
| Modifier and Type | Method and Description |
|---|---|
static HashCode |
calculateSha256(org.apache.jackrabbit.oak.api.Blob blob) |
static boolean |
equal(org.apache.jackrabbit.oak.api.Blob a,
org.apache.jackrabbit.oak.api.Blob b) |
boolean |
equals(Object other)
To
Blob instances are considered equal iff they have the
same SHA-256 hash code are equal. |
String |
getContentIdentity() |
@Nullable String |
getReference() |
int |
hashCode() |
protected byte[] |
sha256()
This hash code implementation returns the hash code of the underlying stream
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetNewStream, isInlined, lengthprotected AbstractBlob(HashCode hashCode)
protected AbstractBlob()
public static boolean equal(org.apache.jackrabbit.oak.api.Blob a, org.apache.jackrabbit.oak.api.Blob b)
public static HashCode calculateSha256(org.apache.jackrabbit.oak.api.Blob blob)
protected byte[] sha256()
@Nullable public @Nullable String getReference()
getReference in interface org.apache.jackrabbit.oak.api.Blobpublic String getContentIdentity()
getContentIdentity in interface org.apache.jackrabbit.oak.api.Blobpublic boolean equals(Object other)
Blob instances are considered equal iff they have the
same SHA-256 hash code are equal.Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.