code: public static Map<String, String> calc( File dataFile, String...algos )
          throws IOException
      {
          Map<String, String> results = new LinkedHashMap<String, String>();
  
          Map<String, MessageDigest> digests = new LinkedHashMap<String, MessageDigest>();
          for ( String algo : algos )
          {
              try
              {
                  digests.put( algo, MessageDigest.getInstance( algo ) );
              }
              catch ( NoSuchAlgorithmException e )
              {
                  results.put( algo, null );
              }
          }
  
          FileInputStream fis = new FileInputStream( dataFile );
          try
          {
              for ( byte[] buffer = new byte[32 * 1024];; )
              {
                  int read = fis.read( buffer );
                  if ( read < 0 )
                  {
                      break;
                  }
                  for ( MessageDigest digest : digests.values() )
                  {
                      digest.update( buffer, 0, read );
                  }
              }
          }
          finally
          {
              closeQuietly( fis );
          }
  
          for ( Map.Entry<String, MessageDigest> entry : digests.entrySet() )
          {
              byte[] bytes = entry.getValue().digest();
  
              results.put( entry.getKey(), toHexString( bytes ) );
          }
  
          return results;
      }
docs: Calculates checksums for the specified file.
  
  @param dataFile The file for which to calculate checksums, must not be {@code null}.
  @param algos The names of checksum algorithms (cf. {@link MessageDigest#getInstance(String)} to use, must not be
  {@code null}.
  @return The calculated checksums, indexed by algorithm name, or the exception that occurred while trying to
  calculate it, never {@code null}.
  @throws IOException If the data file could not be read.