code: static public long checksum2long(byte[] checksum, int offset, int length) {
      long crc = 0L;
      int iter = 0;
      for(int i=offset; i<offset+length; i++, iter++) {
        crc |= (0xffL&(long)checksum[i])<<((length-iter-1)*8);
      }
      return crc;
    }
docs: Convert a checksum byte array to a long