public abstract class AbstractBlob extends Object implements Blob
Blob
implementations.
This base class provides default implementations for
hashCode
and equals
.Modifier and Type | Method and Description |
---|---|
static HashCode |
calculateSha256(Blob blob) |
static boolean |
equal(Blob a,
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()
A unique identifier of the content of this value.
|
@Nullable String |
getReference()
Returns a secure reference to this blob, or
null if such
a reference is not available. |
int |
hashCode() |
String |
toString() |
getNewStream, isInlined, length
@Nullable public @Nullable String getReference()
Blob
null
if such
a reference is not available.getReference
in interface Blob
null
public 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(Object other)
Blob
instances are considered equal iff they have the
same SHA-256 hash code are equal.Copyright © 2010 - 2020 Adobe. All Rights Reserved