import java.io.UnsupportedEncodingException;
import java.util.zip.Adler32;
public class Adler
{
/**
* test Adler digest
* @param args not used
*/
public static void main ( String[] args ) throws UnsupportedEncodingException
{
byte[] theTextToDigestAsBytes = "The quick brown fox jumped over the lazy dog's back".getBytes( "8859_1" );
Adler32 digester = new Adler32();
digester.update( theTextToDigestAsBytes );
int digest = (int) digester.getValue();
System.out.println( Integer.toHexString( digest ) );
}
}