public interface Digester
Modifier and Type | Method and Description |
---|---|
Digester |
createCopy()
Clone the digester so any thread local variables will be cleaned up when the clone is GC'd
|
byte[] |
digest(DataRange data)
Calculates a digest of a data range.
|
byte[] |
digest(Range<?> data)
Calculates Digest of a binary range.
|
byte[] |
digestForced(DataRange data)
Calculates a digest of a data range.
|
int |
length()
Return the length of this digest
|
byte[] digest(DataRange data)
Important: If some of the data can't be read immediately (e.g. due to idiosyncrasies of underlying storage), then this method may return incorrect result.
byte[] digestForced(DataRange data)
IllegalStateException
if any StorageUnit
does
not return enough data.IllegalStateException
- if the underlying StorageUnits in the DataRange return less than
StorageUnit.size()
from
StorageUnit.readBlockFully(java.nio.ByteBuffer, long)
. This can happen
because the storage in the underlying storage units is lazily allocated.byte[] digest(Range<?> data)
int length()
Digester createCopy()
Copyright © 2016–2021. All rights reserved.