Checksum - JRE Emulation | JRE Emulation
public interface

Checksum

java.util.zip.Checksum
Known Indirect Subclasses

Class Overview

The interface common to checksum classes such as Adler32 and CRC32.

Summary

Public Methods
abstract long getValue()
Returns the current calculated checksum value.
abstract void reset()
Resets the checksum value applied before beginning calculations on a new stream of data.
abstract void update(byte[] buf, int off, int nbytes)
Updates the checksum with the given bytes.
abstract void update(int val)
Updates the checksum value with the given byte.

Public Methods

public abstract long getValue ()

Returns the current calculated checksum value.

Returns
  • the checksum.

public abstract void reset ()

Resets the checksum value applied before beginning calculations on a new stream of data.

public abstract void update (byte[] buf, int off, int nbytes)

Updates the checksum with the given bytes.

Parameters
buf the byte array from which to read the bytes.
off the initial position in buf to read the bytes from.
nbytes the number of bytes to read from buf.

public abstract void update (int val)

Updates the checksum value with the given byte.

Parameters
val the byte to update the checksum with.