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

Interface Checksum

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


public interface Checksum

Interface to compute a data checksum used by checked input/output streams. A data checksum can be updated by one byte or with a byte array. After each update the value of the current checksum can be returned by calling getValue. The complete checksum object can also be reset so it can be used again with new data.

Authors:See Also:

Method Summary

longgetValue()

Returns the data checksum computed so far.
voidreset()

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

Adds one byte to the data checksum.
voidupdate(byte[] buf, int off, int len)

Adds the byte array to the data checksum.

Method Details

getValue

public long getValue()

Returns the data checksum computed so far.


reset

public void reset()

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


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)

Adds one byte to the data checksum.

Parameters: