JavaZip CRC32.update()


JavaZip CRC32.update()

package com.codingdict;



import java.util.zip.CRC32;



public class CRC32Demo {



   public static void main(String[] args) {

      String message = "Welcome to codingdict.com";

      byte bytes[] = message.getBytes();



      CRC32 checksum = new CRC32();

      checksum.reset();       



      checksum.update(bytes);

      long checksumValue = checksum.getValue();



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

   }

}