JavaZip Adler32.update() 方法


JavaZip Adler32.update() 方法

package com.codingdict;



import java.util.zip.Adler32;



public class Adler32Demo {



   public static void main(String[] args) {

      String message = "Welcome to codingdict.com";

      byte bytes[] = message.getBytes();



      Adler32 checksum = new Adler32();

      checksum.reset();       



      checksum.update(bytes);

      long checksumValue = checksum.getValue();



      System.out.println("Adler32 checksum :" + checksumValue);

   }

}