code: public static HashingReader createHashingReader( String digestName,
                                                       Reader reader,
                                                       Charset charset ) throws NoSuchAlgorithmException {
          MessageDigest digest = MessageDigest.getInstance(digestName);
          return new HashingReader(digest, reader, charset);
      }
docs: Create an Reader instance that wraps another reader and that computes the secure hash (using the algorithm with the
  supplied name) as the returned Reader is used. This can be used to compute the hash while the content is being processed,
  and saves from having to process the same content twice.
  
  @param digestName the name of the hashing function (or {@link MessageDigest message digest}) that should be used
  @param reader the reader containing the content that is to be hashed
  @param charset the character set used within the supplied reader; may not be null
  @return the hash of the contents as a byte array
  @throws NoSuchAlgorithmException