# Checksum

public interface **Checksum**

|---|---|---|
| Known Indirect Subclasses [Adler32](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/Adler32.html), [CRC32](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/CRC32.html) |---|---| | [Adler32](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/Adler32.html) | A class that can be used to compute the Adler-32 checksum of a data stream. | | [CRC32](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/CRC32.html) | A class that can be used to compute the CRC-32 of a data stream. | |||

An interface representing a data checksum.

### Public Method Summary

|---|---|
| abstract long | [getValue](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/Checksum.html#getValue())() Returns the current checksum value. |
| abstract void | [reset](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/Checksum.html#reset())() Resets the checksum to its initial value. |
| abstract void | [update](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/Checksum.html#update(byte[],%20int,%20int))(byte\[\] b, int off, int len) Updates the current checksum with the specified array of bytes. |
| abstract void | [update](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/Checksum.html#update(int))(int b) Updates the current checksum with the specified byte. |

## Public Methods

#### public abstract long
**getValue**
()

Returns the current checksum value.

##### Returns

- the current checksum value

#### public abstract void
**reset**
()

Resets the checksum to its initial value.

#### public abstract void
**update**
(byte\[\] b, int off, int len)

Updates the current checksum with the specified array of bytes.

##### Parameters

| b | the byte array to update the checksum with |
| off | the start offset of the data |
| len | the number of bytes to use for the update |
|---|---|

#### public abstract void
**update**
(int b)

Updates the current checksum with the specified byte.

##### Parameters

| b | the byte to update the checksum with |
|---|---|