joeq.ClassLib.Common.java.util.zip
Class Adler32

java.lang.Object
  extended by joeq.ClassLib.Common.java.util.zip.Adler32

public class Adler32
extends Object

Adler32

Version:
$Id: Adler32.java,v 1.5 2004/03/09 06:26:29 jwhaley Exp $
Author:
John Whaley

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
 

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.

Parameters:
bval - the data value to add. The high byte of the int is ignored.

update

public void update(byte[] buffer)
Updates the checksum with the bytes taken from the array.

Parameters:
buffer - an array of bytes

update

public void update(byte[] buf,
                   int off,
                   int len)
Updates the checksum with the bytes taken from the array.

Parameters:
buf - an array of bytes
off - the start of the data used for this update
len - the number of bytes to use for this update

getValue

public long getValue()
Returns the Adler32 data checksum computed so far.



Copyright © 2001-2005 John Whaley. All Rights Reserved.