public class CRC32 extends Object implements Checksum
通过null争论这类方法会导致NullPointerException被。
Checksum
| Constructor and Description |
|---|
CRC32()
创建一个新的CRC32的对象。
|
| Modifier and Type | Method and Description |
|---|---|
long |
getValue()
返回CRC-32值。
|
void |
reset()
重置CRC-32初始值。
|
void |
update(byte[] b)
用指定的字节数组更新CRC-32校验。
|
void |
update(byte[] b, int off, int len)
用指定的字节数组更新CRC-32校验。
|
void |
update(ByteBuffer buffer)
更新指定的缓冲区中的字节的校验。
|
void |
update(int b)
更新指定的字节的CRC-32校验和(论证B的低八位)。
|
public void update(int b)
public void update(byte[] b,
int off,
int len)
update 接口
Checksum
b -更新校验和字节数组
off的起始偏移量的数据
len -字节数用于更新
ArrayIndexOutOfBoundsException -如果
off是负的,或
len是负的,或
off+len大于数组的长度
b
public void update(byte[] b)
b -字节更新校验与阵列
public void update(ByteBuffer buffer)
remaining()字节从缓冲区。
position()返回后,缓冲区的位置将被更新到极限;极限已经不会改变。
buffer -缓冲区更新校验和
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.