public abstract class AbstractBlob extends java.lang.Object implements Blob
Blob implementations.
This base class provides default implementations for
hashCode and equals.| Modifier and Type | Method and Description |
|---|---|
static com.google.common.hash.HashCode |
calculateSha256(Blob blob) |
static boolean |
equal(Blob a,
Blob b) |
boolean |
equals(java.lang.Object other)
To
Blob instances are considered equal iff they have the
same SHA-256 hash code are equal. |
java.lang.String |
getContentIdentity()
A unique identifier of the content of this value.
|
@Nullable java.lang.String |
getReference()
Returns a secure reference to this blob, or
null if such
a reference is not available. |
int |
hashCode() |
java.lang.String |
toString() |
getNewStream, isInlined, lengthpublic static com.google.common.hash.HashCode calculateSha256(Blob blob)
@Nullable public @Nullable java.lang.String getReference()
Blobnull if such
a reference is not available.getReference in interface Blobnullpublic java.lang.String getContentIdentity()
BlobThis method returns null if the identifier is unknown. The identifier may not always be available, for example if the value has not yet been saved or processed. Once an identifier is available, it will never change because values are immutable.
If two values have the same identifier, the content of the value is guaranteed to be the same. However it is not guaranteed that two values with the same content will return the same identifier.
The identifier is opaque, meaning it can have any format and size.
getContentIdentity in interface Blobpublic boolean equals(java.lang.Object other)
Blob instances are considered equal iff they have the
same SHA-256 hash code are equal.equals in class java.lang.Objectother - public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2010 - 2023 Adobe. All Rights Reserved