Java in a Nutshell, 5th Edition [Electronic resources]

نسخه متنی -صفحه : 1191/ 879
نمايش فراداده

Adler32java.util.zip

Java 1.1

This class implements the Checksum interface and computes a checksum on a stream of data using the Adler-32 algorithm. This algorithm is significantly faster than the CRC-32 algorithm and is almost as reliable. The CheckedInputStream and CheckedOutputStream classes provide a higher-level interface to computing checksums on streams of data.

Figure 16-134. java.util.zip.Adler32

public class

Adler32 implements Checksum { // Public Constructors public

Adler32 ( ); // Public Instance Methods public void

update (byte[ ]

b ); // Methods Implementing Checksum public long

getValue ( ); default:1 public void

reset ( ); public void

update (int

b ); public void

update (byte[ ]

b , int

off , int

len ); }