Skip to content

Most visited

Recently visited

navigation
Added in API level 1

Adler32

public class Adler32
extends Object implements Checksum

java.lang.Object
   ↳ java.util.zip.Adler32


The Adler-32 class is used to compute the Adler32 checksum from a set of data. Compared to CRC32 it trades reliability for speed. Refer to RFC 1950 for the specification.

Summary

Public constructors

Adler32()

Public methods

long getValue()

Returns the Adler32 checksum for all input received.

void reset()

Reset this instance to its initial checksum.

void update(byte[] buf, int offset, int byteCount)

Update this Adler32 checksum with the contents of buf, starting from offset and reading byteCount bytes of data.

void update(int i)

Update this Adler32 checksum with the single byte provided as argument.

void update(byte[] buf)

Update this Adler32 checksum using the contents of buf.

Inherited methods

From class java.lang.Object
From interface java.util.zip.Checksum

Public constructors

Adler32

Added in API level 1
Adler32 ()

Public methods

getValue

Added in API level 1
long getValue ()

Returns the Adler32 checksum for all input received.

Returns
long The checksum for this instance.

reset

Added in API level 1
void reset ()

Reset this instance to its initial checksum.

update

Added in API level 1
void update (byte[] buf, 
                int offset, 
                int byteCount)

Update this Adler32 checksum with the contents of buf, starting from offset and reading byteCount bytes of data.

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

update

Added in API level 1
void update (int i)

Update this Adler32 checksum with the single byte provided as argument.

Parameters
i int: the byte to update checksum with.

update

Added in API level 1
void update (byte[] buf)

Update this Adler32 checksum using the contents of buf.

Parameters
buf byte: bytes to update 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.