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, length
public static com.google.common.hash.HashCode calculateSha256(Blob blob)
@Nullable public @Nullable java.lang.String getReference()
Blob
null
if such
a reference is not available.getReference
in interface Blob
null
public java.lang.String getContentIdentity()
Blob
This 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 Blob
public 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.Object
other
- public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2010 - 2020 Adobe. All Rights Reserved