code: public static String dgstHex(InputStream is, Digest digest) throws IOException {
          checkNotNull(is);
          byte[] dgstBytes = dgst(is, digest);
          return BaseEncoding.base16().encode(dgstBytes);
      }
docs: Calculates digest and returns the value as a hex string.
  
  @param is     input stream
  @param digest digest algorithm
  @return digest as a hex string
  @throws IOException On error reading from the stream