public class Adler32
extends Object implements Checksum
| java.lang.Object | |
| java.util.zip.Adler32 | |
一个可用于计算数据流的Adler-32校验和的类。 Adler-32校验和与CRC-32几乎一样可靠,但可以更快地计算。
也可以看看:
Public constructors |
|
|---|---|
Adler32() 创建一个新的Adler32对象。 |
|
公共方法(Public methods) |
|
|---|---|
long |
getValue() 返回校验和值。 |
void |
reset() 将校验和重置为初始值。 |
void |
update(byte[] b) 用指定的字节数组更新校验和。 |
void |
update(byte[] b, int off, int len) 用指定的字节数组更新校验和。 |
void |
update(int b) 用指定的字节(参数b的低8位)更新校验和。 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
java.util.zip.Checksum
|
|
void update (byte[] b)
用指定的字节数组更新校验和。
| 参数(Parameters) | |
|---|---|
b |
byte: the byte array to update the checksum with |
void update (byte[] b,
int off,
int len)
用指定的字节数组更新校验和。
| 参数(Parameters) | |
|---|---|
b |
byte: the byte array to update the checksum with |
off |
int: the start offset of the data |
len |
int: the number of bytes to use for the update |
void update (int b)
用指定的字节(参数b的低8位)更新校验和。
| 参数(Parameters) | |
|---|---|
b |
int: the byte to update the checksum with |