Skip to content

Most visited

Recently visited

navigation
Added in API level 1

Checksum

public interface Checksum

java.util.zip.Checksum
Known Indirect Subclasses


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

getValue

Added in API level 1
long getValue ()

Returns the current calculated checksum value.

Returns
long the checksum.

reset

Added in API level 1
void reset ()

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

update

Added in API level 1
void update (byte[] buf, 
                int off, 
                int nbytes)

Updates the checksum with the given bytes.

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

update

Added in API level 1
void update (int val)

Updates the checksum value with the given byte.

Parameters
val int: the byte to update the checksum with.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.