java.lang.Object
ClassLib.Common.java.util.zip.Adler32
- public class Adler32
- extends java.lang.Object
Adler32
- Version:
- $Id: Adler32.java,v 1.4 2003/05/12 10:04:53 joewhaley Exp $
Field Summary |
private static int |
BASE
largest prime smaller than 65536 |
private int |
checksum
|
Constructor Summary |
Adler32()
Creates a new instance of the Adler32 class. |
Method Summary |
long |
getValue()
Returns the Adler32 data checksum computed so far. |
void |
reset()
Resets the Adler32 checksum to the initial value. |
void |
update(byte[] buffer)
Updates the checksum with the bytes taken from the array. |
void |
update(byte[] buf,
int off,
int len)
Updates the checksum with the bytes taken from the array. |
void |
update(int bval)
Updates the checksum with the byte b. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BASE
private static final int BASE
- largest prime smaller than 65536
- See Also:
- Constant Field Values
checksum
private int checksum
Adler32
public Adler32()
- Creates a new instance of the
Adler32
class.
The checksum starts off with a value of 1.
reset
public void reset()
- Resets the Adler32 checksum to the initial value.
update
public void update(int bval)
- Updates the checksum with the byte b.
update
public void update(byte[] buffer)
- Updates the checksum with the bytes taken from the array.
update
public void update(byte[] buf,
int off,
int len)
- Updates the checksum with the bytes taken from the array.
getValue
public long getValue()
- Returns the Adler32 data checksum computed so far.