|
JavaTM 2 Platform Std. Ed. v1.4.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes |
||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.util.zip
Interface Checksum
- public interface Checksum
An interface representing a data checksum. 表示数据校验和的接口。
Method Summary | |
long |
getValue() Returns the current checksum value. 返回当前校验和的值。 |
void |
reset() Resets the checksum to its initial value. 重置校验和为初始值。 |
void |
update(byte[] b, int off, int len) Updates the current checksum with the specified array of bytes. 用指定的字节数组更新当前校验和。 |
void |
update(int b) Updates the current checksum with the specified byte. 用指定的字节更新当前校验和。 |
Method Detail |
update
public void update(int b)
- Updates the current checksum with the specified byte. 用指定的字节更新当前校验和。
-
- Parameters:
b
- the byte to update the checksum with 用于更新校验和的字节数组
update
public 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 用于更新的字节数
getValue
public long getValue()
- Returns the current checksum value. 返回当前校验和的值。
-
- Returns:
- the current checksum value 当前校验和的值
reset
public void reset()
- Resets the checksum to its initial value. 重置校验和为初始值。
-
|
JavaTM 2 Platform Std. Ed. v1.4.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes |
||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.