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

java.lang.Object
  extended by joeq.ClassLib.Common.java.util.zip.CRC32
All Implemented Interfaces:
Checksum

public abstract class CRC32
extends Object
implements Checksum

CRC32

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

Constructor Summary
CRC32()
           
 
Method Summary
 long getValue()
          Returns the CRC32 data checksum computed so far.
 void reset()
          Resets the CRC32 data checksum as if no update was ever called.
 void update(byte[] buf)
          Adds the complete byte array to the data checksum.
 void update(byte[] buf, int off, int len)
          Adds the byte array to the data checksum.
 void update(int bval)
          Updates the checksum with the int bval.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CRC32

public CRC32()
Method Detail

getValue

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

Specified by:
getValue in interface Checksum

reset

public void reset()
Resets the CRC32 data checksum as if no update was ever called.

Specified by:
reset in interface Checksum

update

public void update(int bval)
Updates the checksum with the int bval.

Specified by:
update in interface Checksum
Parameters:
bval - (the byte is taken as the lower 8 bits of bval)

update

public void update(byte[] buf,
                   int off,
                   int len)
Adds the byte array to the data checksum.

Specified by:
update in interface Checksum
Parameters:
buf - the buffer which contains the data
off - the offset in the buffer where the data starts
len - the length of the data

update

public void update(byte[] buf)
Adds the complete byte array to the data checksum.



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