ewe.zip
Interface Checksum

All Known Implementing Classes:
CRC32

public interface Checksum

This is an interface for calculating checksums.

Since:
JDK 1.1

Method Summary
 int getValue()
          Gets the current checksum value.
 void reset()
          Resets the checksum to the initial value.
 void update(byte[] b, int off, int len)
          Calculates the checksum of the given part of the byte array, updating its current value.
 void update(int b)
          Updates the checksum with the byte b.
 

Method Detail

update

public void update(int b)
Updates the checksum with the byte b.

Parameters:
b - the byte, only the lower 8 bits are used.

update

public void update(byte[] b,
                   int off,
                   int len)
Calculates the checksum of the given part of the byte array, updating its current value.

Parameters:
b - an array of bytes
off - the offset into the array.
len - the length.

reset

public void reset()
Resets the checksum to the initial value.


getValue

public int getValue()
Gets the current checksum value.