public class

Adler32

extends Object
implements Checksum
java.lang.Object
   ↳ java.util.zip.Adler32

Class Overview

A class that can be used to compute the Adler-32 checksum of a data stream. An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed much faster.

See Also

Summary

Public Constructors
Adler32()
Creates a new Adler32 object.
Public Methods
long getValue()
Returns checksum value.
void reset()
Resets checksum to initial value.
void update(byte[] b, int off, int len)
Updates checksum with specified array of bytes.
void update(int b)
Updates checksum with specified byte.
void update(byte[] b)
Updates checksum with specified array of bytes.
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.util.zip.Checksum

Public Constructors

public Adler32 ()

Creates a new Adler32 object.

Public Methods

public long getValue ()

Returns checksum value.

Returns
  • the current checksum value

public void reset ()

Resets checksum to initial value.

public void update (byte[] b, int off, int len)

Updates checksum with specified array of bytes.

Parameters
b the byte array to update the checksum with
off the start offset of the data
len the number of bytes to use for the update

public void update (int b)

Updates checksum with specified byte.

Parameters
b an array of bytes

public void update (byte[] b)

Updates checksum with specified array of bytes.