public class ContentDigestManager
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Content content1,
Content content2)
Returns
true if the contents in parameter contains the same data,
comparing their digest. |
byte[] |
getContentDigest(Content content)
Returns the SHA-1 digest of the given
content , computing it
if it wasn't set. |
java.lang.Long |
getContentSize(Content content)
Returns the size of the given
content . |
static ContentDigestManager |
getInstance()
Returns an instance of this singleton.
|
boolean |
isContentDigestEqual(Content content,
byte[] digest)
Returns
true if the digest of the given content
is equal to digest . |
void |
setContentDigest(Content content,
byte[] digest)
Sets the SHA-1 digest of the given
content . |
public static ContentDigestManager getInstance()
public boolean equals(Content content1, Content content2)
true
if the contents in parameter contains the same data,
comparing their digest. If the digest of the contents was not
set directly, it will be
computed on the fly.public boolean isContentDigestEqual(Content content, byte[] digest)
true
if the digest of the given content
is equal to digest
.public void setContentDigest(Content content, byte[] digest)
content
.public byte[] getContentDigest(Content content)
content
, computing it
if it wasn't set.public java.lang.Long getContentSize(Content content)
content
.
© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License