现在的位置: 首页 > 综合 > 正文

java.util.zip.Checksum翻译

2013年10月08日 ⁄ 综合 ⁄ 共 2087字 ⁄ 字号 评论关闭
 
JavaTM 2 Platform
Std. Ed. v1.4.2




java.util.zip
Interface Checksum

All Known Implementing Classes:
Adler32, CRC32



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



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.

抱歉!评论已关闭.