title: Get MD5 String from Message Digest
body: <p>I understand how it works but if I want to print out the MD5 as String how would I do that? </p>
  
  <pre><code>public static void getMD5(String fileName) throws Exception{
      InputStream input =  new FileInputStream(fileName);
      byte[] buffer = new byte[1024];
  
      MessageDigest hash = MessageDigest.getInstance("MD5");
      int read;
      do {
          read = input.read(buffer);
          if (read &gt; 0) {
              hash.update(buffer, 0, read);
          }
      } while (read != -1);
      input.close();
  }
  </code></pre>