@Nullable public static String fileMd5(@Nullable File file,@Nullable IgniteLogger log){
  String md5=null;
  if (file != null) {
    if (!file.isFile()) {
      U.warn(log,"Failed to find file for md5 calculation: " + file);
      return null;
    }
    InputStream in=null;
    try {
      in=new BufferedInputStream(new FileInputStream(file));
      md5=DigestUtils.md5Hex(in);
    }
 catch (    IOException e) {
      U.warn(log,"Failed to open input stream for md5 calculation: " + e.getMessage());
    }
 finally {
      U.closeQuiet(in);
    }
  }
  return md5;
}

@ Nullable public static String fileMd5 ( @ Nullable File file , @ Nullable IgniteLogger log ) { String md5 = null ; if ( file != null ) { if ( ! file . isFile ( ) ) { U . warn ( log , "Failed to find file for md5 calculation: " + file ) ; return null ; } InputStream in = null ; try { in = new BufferedInputStream ( new FileInputStream ( file ) ) ; md5 = DigestUtils . md5Hex ( in ) ; } catch ( IOException e ) { U . warn ( log , "Failed to open input stream for md5 calculation: " + e . getMessage ( ) ) ; } finally { U . closeQuiet ( in ) ; } } return md5 ; }
calculates md5 checksum for the given file
