public static boolean verifyFileMd5(File file,String md5){
  if (md5 == null) {
    return false;
  }
  String fileMd5=getMD5(file);
  if (fileMd5 == null) {
    return false;
  }
  return md5.equals(fileMd5);
}

public static boolean verifyFileMd5 ( File file , String md5 ) { if ( md5 == null ) { return false ; } String fileMd5 = getMD5 ( file ) ; if ( fileMd5 == null ) { return false ; } return md5 . equals ( fileMd5 ) ; }
returns whether the file is a valid file .
