Code example for Adler32

Methods: getValue, reset, update

0
        mAdler32.update(data);
        return (int) mAdler32.getValue();
    } 
 
    int checkSum(byte[] data, int offset, int nbytes) {
        mAdler32.reset();
        mAdler32.update(data, offset, nbytes);
        return (int) mAdler32.getValue();
    } 
 
    static void closeSilently(Closeable c) {
        if (c == null) return;
        try { 
            c.close();
        } catch (Throwable t) {
            // do nothing 
        } 
    } 
 
    static int readInt(byte[] buf, int offset) {
        return (buf[offset] & 0xff)