- java.util.zip Package Classes
- java.util.zip - Home
- java.util.zip - Adler32
- java.util.zip - CheckedInputStream
- java.util.zip - CheckedOutputStream
- java.util.zip - CRC32
- java.util.zip - Deflater
- java.util.zip - DeflaterInputStream
- java.util.zip - DeflaterOutputStream
- java.util.zip - GZIPInputStream
- java.util.zip - GZIPOutputStream
- java.util.zip - Inflater
- java.util.zip - InflaterInputStream
- java.util.zip - InflaterOutputStream
- java.util.zip - ZipEntry
- java.util.zip - ZipFile
- java.util.zip - ZipInputStream
- java.util.zip - ZipOutputStream
- java.util.zip Package Extras
- java.util.zip - Exceptions
- java.util.zip - Error
- java.util.zip Useful Resources
- java.util.zip - Quick Guide
- java.util.zip - Useful Resources
- java.util.zip - Discussion
java.util.zip.Adler32.update() Method Example
Description
The java.util.zip.Adler32.update(int b) method updates the checksum with the specified byte (the low eight bits of the argument b).
Declaration
Following is the declaration for java.util.zip.Adler32.update(int b) method.
public void update(int b)
Parameters
b − the byte to update the checksum with.
Example
The following example shows the usage of java.util.zip.Adler32.update(byte[] b) method.
package com.tutorialspoint; import java.util.zip.Adler32; import java.util.zip.Checksum; public class Adler32Demo { public static void main(String[] args) { int bytes = 55; Checksum checksum = new Adler32(); checksum.reset(); checksum.update(bytes); long checksumValue = checksum.getValue(); System.out.println("Adler32 checksum :" + checksumValue); } }
Let us compile and run the above program, this will produce the following result −
Adler32 checksum :3670072Print
javazip_adler32.htm
Advertisements