public interface ChecksumWithInPlaceUpdate extends Checksum
Modifier and Type | Method and Description |
---|---|
void |
append(ByteBuffer update)
Appends a buffer at the end and updates the checksum
|
long |
length()
Return the length of file till which the checksum has been calculated.
|
void |
restore(long checksum,
long length)
Restores the state to a previously calculated checksum value and length for a given file.
|
void |
update(ByteBuffer updated,
ByteBuffer previous,
long offset)
In-place update a buffer at offset and update the checksum.
|
void append(ByteBuffer update)
update
- the append buffervoid update(ByteBuffer updated, ByteBuffer previous, long offset)
updated
- the buffer containing the updated data from offsetprevious
- the buffer containing the previous data from offsetoffset
- the position from which the data is to be updatedvoid restore(long checksum, long length)
checksum
- the checksum value to be restoredlength
- the total length of the file till which checksum was calculated to be restoredlong length()