Package org.apache.xml.security.c14n
Class CanonicalizerSpi
- java.lang.Object
-
- org.apache.xml.security.c14n.CanonicalizerSpi
-
public abstract class CanonicalizerSpi extends java.lang.ObjectBase class which all Caninicalization algorithms extend. $todo$ cange JavaDoc- Author:
- Christian Geuer-Pollmann
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanresetReset the writter after a c14n
-
Constructor Summary
Constructors Constructor Description CanonicalizerSpi()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description byte[]engineCanonicalize(byte[] inputBytes)Method canonicalizeabstract byte[]engineCanonicalizeSubTree(org.w3c.dom.Node rootNode)C14n a node tree.abstract byte[]engineCanonicalizeSubTree(org.w3c.dom.Node rootNode, java.lang.String inclusiveNamespaces)C14n a node tree.abstract byte[]engineCanonicalizeXPathNodeSet(java.util.Set xpathNodeSet)C14n a nodesetabstract byte[]engineCanonicalizeXPathNodeSet(java.util.Set xpathNodeSet, java.lang.String inclusiveNamespaces)C14n a nodesetbyte[]engineCanonicalizeXPathNodeSet(org.w3c.dom.NodeList xpathNodeSet)Method engineCanonicalizeXPathNodeSetbyte[]engineCanonicalizeXPathNodeSet(org.w3c.dom.NodeList xpathNodeSet, java.lang.String inclusiveNamespaces)Method engineCanonicalizeXPathNodeSetabstract booleanengineGetIncludeComments()Returns the URI if include commentsabstract java.lang.StringengineGetURI()Returns the URI of this engine.abstract voidsetWriter(java.io.OutputStream os)Sets the writter where the cannocalization ends.
-
-
-
Method Detail
-
engineCanonicalize
public byte[] engineCanonicalize(byte[] inputBytes) throws javax.xml.parsers.ParserConfigurationException, java.io.IOException, org.xml.sax.SAXException, CanonicalizationExceptionMethod canonicalize- Parameters:
inputBytes-- Returns:
- the c14n bytes.
- Throws:
CanonicalizationExceptionjava.io.IOExceptionjavax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXException
-
engineCanonicalizeXPathNodeSet
public byte[] engineCanonicalizeXPathNodeSet(org.w3c.dom.NodeList xpathNodeSet) throws CanonicalizationExceptionMethod engineCanonicalizeXPathNodeSet- Parameters:
xpathNodeSet-- Returns:
- the c14n bytes
- Throws:
CanonicalizationException
-
engineCanonicalizeXPathNodeSet
public byte[] engineCanonicalizeXPathNodeSet(org.w3c.dom.NodeList xpathNodeSet, java.lang.String inclusiveNamespaces) throws CanonicalizationExceptionMethod engineCanonicalizeXPathNodeSet- Parameters:
xpathNodeSet-inclusiveNamespaces-- Returns:
- the c14n bytes
- Throws:
CanonicalizationException
-
engineGetURI
public abstract java.lang.String 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(java.util.Set xpathNodeSet) throws CanonicalizationExceptionC14n a nodeset- Parameters:
xpathNodeSet-- Returns:
- the c14n bytes
- Throws:
CanonicalizationException
-
engineCanonicalizeXPathNodeSet
public abstract byte[] engineCanonicalizeXPathNodeSet(java.util.Set xpathNodeSet, java.lang.String inclusiveNamespaces) throws CanonicalizationExceptionC14n a nodeset- Parameters:
xpathNodeSet-inclusiveNamespaces-- Returns:
- the c14n bytes
- Throws:
CanonicalizationException
-
engineCanonicalizeSubTree
public abstract byte[] engineCanonicalizeSubTree(org.w3c.dom.Node rootNode) throws CanonicalizationExceptionC14n a node tree.- Parameters:
rootNode-- Returns:
- the c14n bytes
- Throws:
CanonicalizationException
-
engineCanonicalizeSubTree
public abstract byte[] engineCanonicalizeSubTree(org.w3c.dom.Node rootNode, java.lang.String inclusiveNamespaces) throws CanonicalizationExceptionC14n a node tree.- Parameters:
rootNode-inclusiveNamespaces-- Returns:
- the c14n bytes
- Throws:
CanonicalizationException
-
setWriter
public abstract void setWriter(java.io.OutputStream os)
Sets the writter where the cannocalization ends. ByteArrayOutputStream if none is setted.- Parameters:
os-
-
-