Checksum
interface Checksum
java.util.zip.Checksum |
An interface representing a data checksum.
Summary
Public methods | |
---|---|
abstract Long |
getValue() Returns the current checksum value. |
abstract Unit |
reset() Resets the checksum to its initial value. |
abstract Unit |
Updates the current checksum with the specified byte. |
open Unit |
Updates the current checksum with the specified array of bytes. |
abstract Unit |
Updates the current checksum with the specified array of bytes. |
open Unit |
update(buffer: ByteBuffer!) Updates the current checksum with the bytes from the specified buffer. |
Public methods
getValue
abstract fun getValue(): Long
Returns the current checksum value.
Return | |
---|---|
Long |
the current checksum value |
update
abstract fun update(b: Int): Unit
Updates the current checksum with the specified byte.
Parameters | |
---|---|
b |
Int: the byte to update the checksum with |
update
open fun update(b: ByteArray!): Unit
Updates the current checksum with the specified array of bytes.
Parameters | |
---|---|
b |
ByteArray!: the array of bytes to update the checksum with |
Exceptions | |
---|---|
java.lang.NullPointerException |
if b is null |
update
abstract fun update(
b: ByteArray!,
off: Int,
len: Int
): Unit
Updates the current checksum with the specified array of bytes.
Parameters | |
---|---|
b |
ByteArray!: the byte array to update the checksum with |
off |
Int: the start offset of the data |
len |
Int: the number of bytes to use for the update |
update
open fun update(buffer: ByteBuffer!): Unit
Updates the current checksum with the bytes from the specified buffer. The checksum is updated with the remaining bytes in the buffer, starting at the buffer's position. Upon return, the buffer's position will be updated to its limit; its limit will not have been changed.
Parameters | |
---|---|
buffer |
ByteBuffer!: the ByteBuffer to update the checksum with |
Exceptions | |
---|---|
java.lang.NullPointerException |
if buffer is null |