code: public static String createHash(final File file, final String algorithm) {
          checkNotNull("file", file);
          checkNotNull("algorithm", algorithm);
          try {
              try (final FileInputStream in = new FileInputStream(file)) {
                  return createHash(in, algorithm);
              }
          } catch (final IOException ex) {
              throw new RuntimeException(ex);
          }
      }
docs: Creates a HEX encoded hash from a file.
  
  @param file
  File to create a hash for - Cannot be <code>null</code>.
  @param algorithm
  Hash algorithm like "MD5" or "SHA" - Cannot be <code>null</code>.
  
  @return HEX encoded hash.