java.util.zip.Checksum翻译

来源:互联网 发布:淘宝店子账号怎么设置 编辑:程序博客网 时间:2024/05/03 14:10
 Overview Package  Class Use Tree Deprecated Index Help JavaTM 2 Platform
Std. Ed. v1.4.2
 PREV CLASS   NEXT CLASSFRAMES    NO FRAMES     All Classes SUMMARY: NESTED | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD

java.util.zip
Interface Checksum

All Known Implementing Classes:
Adler32, CRC32

public interface Checksum

An interface representing a data checksum. 表示数据校验和的接口。


Method Summary longgetValue()
          Returns the current checksum value. 返回当前校验和的值。
 voidreset()
          Resets the checksum to its initial value. 重置校验和为初始值。
 voidupdate(byte[] b, int off, int len)
          Updates the current checksum with the specified array of bytes. 用指定的字节数组更新当前校验和。
 voidupdate(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. 重置校验和为初始值。


Overview Package  Class Use Tree Deprecated Index Help JavaTM 2 Platform
Std. Ed. v1.4.2
 PREV CLASS   NEXT CLASSFRAMES    NO FRAMES     All Classes SUMMARY: NESTED | FIELD | CONSTR | METHODDETAIL: 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.