Adler32 Checksum In Java

Chapter: ZIP Last Updated: 23-04-2016 03:23:32 UTC

Program:

            /* ............... START ............... */
                
import java.util.zip.Adler32;
import java.util.zip.Checksum;

public class JavaAdler32CheckSum {
	public static void main(String args[]) {

		String string = "Adler32 Checksum For Byte Array";

		// Convert string to bytes
		byte bytes[] = string.getBytes();

		Checksum checksum = new Adler32();

		checksum.update(bytes, 0, bytes.length);

		long lngChecksum = checksum.getValue();

		System.out.println("Adler32 checksum for byte array :" + lngChecksum);
	}

}
                /* ............... END ............... */
        

Output

Adler32 checksum for byte array :2806975163

Tags

Adler32 Checksum, Java

Similar Programs Chapter Last Updated
Zip Entry Is Directory Example In Java ZIP 23-04-2016
Create Zip File With CRC32 Checksum In Java ZIP 23-04-2016
Create Zip File With Adler32 Checksum In Java ZIP 23-04-2016
Extract Zip File With Adler32 Checksum In Java ZIP 23-04-2016
Extract File With CRC32 Checksum In Java ZIP 23-04-2016
CRC32 Checksum In Java ZIP 10-08-2016
Read Zip File Checksum Value In Java Example ZIP 20-07-2016
Create Checksum For Zip File In Java ZIP 07-08-2017
Decompress Zip File Using ZipInputStream In Java ZIP 20-07-2016
Read Entries In Zip File In Java Example ZIP 20-07-2016
List The Contents Of Zip File In Java Example ZIP 07-08-2017
Extract Contents Of Zip File In Java Example ZIP 07-08-2017
Zip File Creation In Java Example ZIP 23-06-2016

1