Class XMLSignatureInput


  • public class XMLSignatureInput
    extends Object
    Class XMLSignatureInput $todo$ check whether an XMLSignatureInput can be _both_, octet stream _and_ node set?
    • Constructor Detail

      • XMLSignatureInput

        public XMLSignatureInput​(byte[] inputOctets)
        Construct a XMLSignatureInput from an octet array.

        This is a comfort method, which internally converts the byte[] array into an InputStream

        NOTE: no defensive copy

        Parameters:
        inputOctets - an octet array which including XML document or node
      • XMLSignatureInput

        public XMLSignatureInput​(InputStream inputOctetStream)
        Constructs a XMLSignatureInput from an octet stream. The stream is directly read.
        Parameters:
        inputOctetStream -
      • XMLSignatureInput

        public XMLSignatureInput​(Node rootNode)
        Construct a XMLSignatureInput from a subtree rooted by rootNode. This method included the node and all his descendants in the output.
        Parameters:
        rootNode -
      • XMLSignatureInput

        public XMLSignatureInput​(Set<Node> inputNodeSet)
        Constructor XMLSignatureInput
        Parameters:
        inputNodeSet -
      • XMLSignatureInput

        public XMLSignatureInput​(String preCalculatedDigest)
        Construct a XMLSignatureInput from a known digest value in Base64. This makes it possible to compare the element digest with the provided digest value.
        Parameters:
        preCalculatedDigest - digest value in base64.
    • Method Detail

      • isNeedsToBeExpanded

        public boolean isNeedsToBeExpanded()
        Check if the structure needs to be expanded.
        Returns:
        true if so.
      • setNeedsToBeExpanded

        public void setNeedsToBeExpanded​(boolean needsToBeExpanded)
        Set if the structure needs to be expanded.
        Parameters:
        needsToBeExpanded - true if so.
      • getInputNodeSet

        public Set<Node> getInputNodeSet()
        Get the Input NodeSet.
        Returns:
        the Input NodeSet.
      • getOctetStreamReal

        public InputStream getOctetStreamReal()
        Returns:
        real octet stream
      • isNodeSet

        public boolean isNodeSet()
        Determines if the object has been set up with a Node set
        Returns:
        true if the object has been set up with a Node set
      • isElement

        public boolean isElement()
        Determines if the object has been set up with an Element
        Returns:
        true if the object has been set up with an Element
      • isOctetStream

        public boolean isOctetStream()
        Determines if the object has been set up with an octet stream
        Returns:
        true if the object has been set up with an octet stream
      • isByteArray

        public boolean isByteArray()
        Determines if the object has been set up with a ByteArray
        Returns:
        true is the object has been set up with an octet stream
      • isPreCalculatedDigest

        public boolean isPreCalculatedDigest()
        Determines if the object has been set up with a pre-calculated digest.
        Returns:
      • isInitialized

        public boolean isInitialized()
        Is the object correctly set up?
        Returns:
        true if the object has been set up correctly
      • getMIMEType

        public String getMIMEType()
        Returns mimeType
        Returns:
        mimeType
      • setMIMEType

        public void setMIMEType​(String mimeType)
        Sets mimeType
        Parameters:
        mimeType -
      • getSourceURI

        public String getSourceURI()
        Return SourceURI
        Returns:
        SourceURI
      • setSourceURI

        public void setSourceURI​(String sourceURI)
        Sets SourceURI
        Parameters:
        sourceURI -
      • getExcludeNode

        public Node getExcludeNode()
        Gets the exclude node of this XMLSignatureInput
        Returns:
        Returns the excludeNode.
      • setExcludeNode

        public void setExcludeNode​(Node excludeNode)
        Sets the exclude node of this XMLSignatureInput
        Parameters:
        excludeNode - The excludeNode to set.
      • getSubNode

        public Node getSubNode()
        Gets the node of this XMLSignatureInput
        Returns:
        The excludeNode set.
      • isExcludeComments

        public boolean isExcludeComments()
        Returns:
        Returns the excludeComments.
      • setExcludeComments

        public void setExcludeComments​(boolean excludeComments)
        Parameters:
        excludeComments - The excludeComments to set.
      • setOutputStream

        public void setOutputStream​(OutputStream os)
        Parameters:
        os -
      • addNodeFilter

        public void addNodeFilter​(NodeFilter filter)
        Parameters:
        filter -
      • getNodeFilters

        public List<NodeFilter> getNodeFilters()
        Returns:
        the node filters
      • setNodeSet

        public void setNodeSet​(boolean b)
        Parameters:
        b -
      • isSecureValidation

        public boolean isSecureValidation()
      • setSecureValidation

        public void setSecureValidation​(boolean secureValidation)
      • getPreCalculatedDigest

        public String getPreCalculatedDigest()