Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.util.zip

Class CRC32

java.lang.Object
|
+--java.util.zip.CRC32

All Implemented Interfaces:

Checksum


public class CRC32

extends Object

implements Checksum

Computes CRC32 data checksum of a data stream. The actual CRC32 algorithm is described in RFC 1952 (GZIP file format specification version 4.3). Can be used to get the CRC32 over a stream if used with checked input/output streams.

Author:See Also:

Method Summary

longgetValue()

Returns the CRC32 data checksum computed so far.
voidreset()

Resets the CRC32 data checksum as if no update was ever called.
voidupdate(int bval)

Updates the checksum with the int bval.
voidupdate(byte[] buf, int off, int len)

Adds the byte array to the data checksum.
voidupdate(byte[] buf)

Adds the complete byte array to the data checksum.

Method Details

getValue

public long getValue()

Returns the CRC32 data checksum computed so far.


reset

public void reset()

Resets the CRC32 data checksum as if no update was ever called.


update

public void update(byte[] buf)

Adds the complete byte array to the data checksum.

Parameters:


update

public void update(byte[] buf, int off, int len)

Adds the byte array to the data checksum.

Parameters:


update

public void update(int bval)

Updates the checksum with the int bval.

Parameters: