Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

ClassLib.Common.java.util.zip
Class Adler32  view Adler32 download Adler32.java

java.lang.Object
  extended byClassLib.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
 

Field Detail

BASE

private static final int BASE
largest prime smaller than 65536

See Also:
Constant Field Values

checksum

private int checksum
Constructor Detail

Adler32

public Adler32()
Creates a new instance of the Adler32 class. The checksum starts off with a value of 1.

Method Detail

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.