Package org.apache.xml.security.c14n
Class CanonicalizerSpi
java.lang.Object
org.apache.xml.security.c14n.CanonicalizerSpi
Base class which all Caninicalization algorithms extend.
$todo$ cange JavaDoc
- Author:
- Christian Geuer-Pollmann
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
engineCanonicalize
(byte[] inputBytes) Method canonicalizeabstract byte[]
engineCanonicalizeSubTree
(Node rootNode) C14n a node tree.abstract byte[]
engineCanonicalizeSubTree
(Node rootNode, String inclusiveNamespaces) C14n a node tree.abstract byte[]
engineCanonicalizeXPathNodeSet
(Set xpathNodeSet) C14n a nodesetabstract byte[]
engineCanonicalizeXPathNodeSet
(Set xpathNodeSet, String inclusiveNamespaces) C14n a nodesetbyte[]
engineCanonicalizeXPathNodeSet
(NodeList xpathNodeSet) Method engineCanonicalizeXPathNodeSetbyte[]
engineCanonicalizeXPathNodeSet
(NodeList xpathNodeSet, String inclusiveNamespaces) Method engineCanonicalizeXPathNodeSetabstract boolean
Returns the URI if include commentsabstract String
Returns the URI of this engine.abstract void
Sets the writter where the cannocalization ends.
-
Field Details
-
reset
protected boolean resetReset the writter after a c14n
-
-
Constructor Details
-
CanonicalizerSpi
public CanonicalizerSpi()
-
-
Method Details
-
engineCanonicalize
public byte[] engineCanonicalize(byte[] inputBytes) throws ParserConfigurationException, IOException, SAXException, CanonicalizationException Method canonicalize- Parameters:
inputBytes
-- Returns:
- the c14n bytes.
- Throws:
CanonicalizationException
IOException
ParserConfigurationException
SAXException
-
engineCanonicalizeXPathNodeSet
public byte[] engineCanonicalizeXPathNodeSet(NodeList xpathNodeSet) throws CanonicalizationException Method engineCanonicalizeXPathNodeSet- Parameters:
xpathNodeSet
-- Returns:
- the c14n bytes
- Throws:
CanonicalizationException
-
engineCanonicalizeXPathNodeSet
public byte[] engineCanonicalizeXPathNodeSet(NodeList xpathNodeSet, String inclusiveNamespaces) throws CanonicalizationException Method engineCanonicalizeXPathNodeSet- Parameters:
xpathNodeSet
-inclusiveNamespaces
-- Returns:
- the c14n bytes
- Throws:
CanonicalizationException
-
engineGetURI
Returns the URI of this engine.- Returns:
- the URI
-
engineGetIncludeComments
public abstract boolean engineGetIncludeComments()Returns the URI if include comments- Returns:
- true if include.
-
engineCanonicalizeXPathNodeSet
public abstract byte[] engineCanonicalizeXPathNodeSet(Set xpathNodeSet) throws CanonicalizationException C14n a nodeset- Parameters:
xpathNodeSet
-- Returns:
- the c14n bytes
- Throws:
CanonicalizationException
-
engineCanonicalizeXPathNodeSet
public abstract byte[] engineCanonicalizeXPathNodeSet(Set xpathNodeSet, String inclusiveNamespaces) throws CanonicalizationException C14n a nodeset- Parameters:
xpathNodeSet
-inclusiveNamespaces
-- Returns:
- the c14n bytes
- Throws:
CanonicalizationException
-
engineCanonicalizeSubTree
C14n a node tree.- Parameters:
rootNode
-- Returns:
- the c14n bytes
- Throws:
CanonicalizationException
-
engineCanonicalizeSubTree
public abstract byte[] engineCanonicalizeSubTree(Node rootNode, String inclusiveNamespaces) throws CanonicalizationException C14n a node tree.- Parameters:
rootNode
-inclusiveNamespaces
-- Returns:
- the c14n bytes
- Throws:
CanonicalizationException
-
setWriter
Sets the writter where the cannocalization ends. ByteArrayOutputStream if none is setted.- Parameters:
os
-
-