Class MessageDigestCalculatingInputStream.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • get

        public MessageDigestCalculatingInputStream get()
                                                throws java.io.IOException
        Constructs a new instance.

        This builder use the aspects InputStream, OpenOption[], and MessageDigest.

        You must provide an origin that can be converted to an InputStream by this builder, otherwise, this call will throw an UnsupportedOperationException.

        Returns:
        a new instance.
        Throws:
        java.lang.UnsupportedOperationException - if the origin cannot provide an InputStream.
        java.io.IOException - if an I/O error occurs.
        See Also:
        AbstractStreamBuilder.getInputStream()
      • setMessageDigest

        public void setMessageDigest​(java.security.MessageDigest messageDigest)
        Sets the message digest.
        Parameters:
        messageDigest - the message digest.
      • setMessageDigest

        public void setMessageDigest​(java.lang.String algorithm)
                              throws java.security.NoSuchAlgorithmException
        Sets the name of the name of the message digest algorithm.
        Parameters:
        algorithm - the name of the algorithm. See the MessageDigest section in the Java Cryptography Architecture Standard Algorithm Name Documentation for information about standard algorithm names.
        Throws:
        java.security.NoSuchAlgorithmException - if no Provider supports a MessageDigestSpi implementation for the specified algorithm.