public int computeChecksum() throws IOException {
    Adler32 adler32 = new Adler32();
    byte[] buffer = new byte[8192];
    ByteBuffer data = this.data.duplicate(); // positioned ByteBuffers aren't thread safe
    data.limit(data.capacity());
    data.position(CHECKSUM_OFFSET + CHECKSUM_SIZE);
    while (data.hasRemaining()) {
      int count = Math.min(buffer.length, data.remaining());
      data.get(buffer, 0, count);
      adler32.update(buffer, 0, count);
    }
    return (int) adler32.getValue();
  }
Returns the checksum of all but the first 12 bytes of {@code dex}.
android/android_framework/dex-maker/src/main/java/com/android/dex/Dex.java