Build 1.0_r1(from source)

java.util.zip
Class CRC32

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

public class CRC32
extends Object
implements Checksum

The CRC32 class is used to compute a CRC32 Checksum from a set of data.


Field Summary
(package private)  long tbytes
           
 
Constructor Summary
CRC32()
           
 
Method Summary
 long getValue()
          Returns the CRC32 Checksum for all input received.
 void reset()
          Returns the CRC32 checksum to it initial state.
 void update(byte[] buf)
          Updates this Checksum with the bytes contained in buffer buf.
 void update(byte[] buf, int off, int nbytes)
          Updates this Checksum with nbytes of data from buffer buf, starting at offset off.
 void update(int val)
          Updates this Checksum with value val
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tbytes

long tbytes
Constructor Detail

CRC32

public CRC32()
Method Detail

getValue

public long getValue()
Returns the CRC32 Checksum for all input received.

Specified by:
getValue in interface Checksum
Returns:
The checksum for this instance

reset

public void reset()
Returns the CRC32 checksum to it initial state.

Specified by:
reset in interface Checksum

update

public void update(int val)
Updates this Checksum with value val

Specified by:
update in interface Checksum

update

public void update(byte[] buf)
Updates this Checksum with the bytes contained in buffer buf.

Parameters:
buf - Buffer to update Checksum

update

public void update(byte[] buf,
                   int off,
                   int nbytes)
Updates this Checksum with nbytes of data from buffer buf, starting at offset off.

Specified by:
update in interface Checksum
Parameters:
buf - Buffer to update Checksum
off - Offset in buf to obtain data from
nbytes - Number of bytes to read from buf

Build 1.0_r1(from source)

Please submit a feedback, bug or feature