Java examples for File Path IO:Byte Array
Generate Adler32 Checksum For Byte Array
import java.util.zip.Adler32; import java.util.zip.Checksum; public class Main { public static void main(String args[]){ /* w w w . ja va 2 s . c om*/ String str = "Generate Adler32 Checksum For Byte Array"; byte bytes[] = str.getBytes(); Checksum checksum = new Adler32(); checksum.update(bytes,0,bytes.length); long lngChecksum = checksum.getValue(); System.out.println("Adler32 checksum for byte array is :" + lngChecksum); } }