public abstract class CanonicalizerBase extends CanonicalizerSpi
Modifier and Type | Field and Description |
---|---|
protected static AttrCompare |
COMPARE |
protected static int |
NODE_AFTER_DOCUMENT_ELEMENT |
protected static int |
NODE_BEFORE_DOCUMENT_ELEMENT |
protected static int |
NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT |
static String |
XML |
static String |
XML_LANG_URI |
static String |
XMLNS |
static String |
XMLNS_URI |
Modifier | Constructor and Description |
---|---|
protected |
CanonicalizerBase(boolean includeComments)
Constructor CanonicalizerBase
|
Modifier and Type | Method and Description |
---|---|
void |
engineCanonicalize(XMLSignatureInput input,
OutputStream writer,
boolean secureValidation)
Canonicalizes a Subtree node.
|
protected void |
engineCanonicalizeSubTree(Node rootNode,
Node excludeNode,
OutputStream writer)
Canonicalizes a Subtree node.
|
void |
engineCanonicalizeSubTree(Node rootNode,
OutputStream writer)
Method engineCanonicalizeSubTree
C14n a node tree.
|
void |
engineCanonicalizeXPathNodeSet(Set<Node> xpathNodeSet,
OutputStream writer)
Method engineCanonicalizeXPathNodeSet
C14n a nodeset
|
protected Attr |
getNullNode(Document ownerDocument) |
protected void |
handleParent(Element e,
NameSpaceSymbTable ns) |
protected boolean |
isVisible(Node currentNode) |
protected int |
isVisibleDO(Node currentNode,
int level) |
protected int |
isVisibleInt(Node currentNode) |
protected static void |
outputAttrToWriter(String name,
String value,
OutputStream writer,
Map<String,byte[]> cache)
Outputs an Attribute to the internal Writer.
|
protected void |
outputCommentToWriter(Comment currentComment,
OutputStream writer,
int position)
Method outputCommentToWriter
|
protected void |
outputPItoWriter(ProcessingInstruction currentPI,
OutputStream writer,
int position)
Outputs a PI to the internal Writer.
|
engineCanonicalize, engineCanonicalizeSubTree, engineCanonicalizeSubTree, engineCanonicalizeXPathNodeSet, engineGetURI
public static final String XML
public static final String XMLNS
public static final String XMLNS_URI
public static final String XML_LANG_URI
protected static final AttrCompare COMPARE
protected static final int NODE_BEFORE_DOCUMENT_ELEMENT
protected static final int NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT
protected static final int NODE_AFTER_DOCUMENT_ELEMENT
protected CanonicalizerBase(boolean includeComments)
includeComments
- public void engineCanonicalizeSubTree(Node rootNode, OutputStream writer) throws CanonicalizationException
engineCanonicalizeSubTree
in class CanonicalizerSpi
rootNode
- writer
- OutputStream to write the canonicalization resultCanonicalizationException
public void engineCanonicalizeXPathNodeSet(Set<Node> xpathNodeSet, OutputStream writer) throws CanonicalizationException
engineCanonicalizeXPathNodeSet
in class CanonicalizerSpi
xpathNodeSet
- writer
- OutputStream to write the canonicalization resultCanonicalizationException
public void engineCanonicalize(XMLSignatureInput input, OutputStream writer, boolean secureValidation) throws CanonicalizationException
input
- the root of the subtree to canicalizewriter
- OutputStream to write the canonicalization resultsecureValidation
- Whether secure validation is enabledCanonicalizationException
protected void engineCanonicalizeSubTree(Node rootNode, Node excludeNode, OutputStream writer) throws CanonicalizationException
rootNode
- the root of the subtree to canonicalizeexcludeNode
- a node to be excluded from the canonicalize operationwriter
- OutputStream to write the canonicalization resultCanonicalizationException
protected int isVisibleDO(Node currentNode, int level)
protected int isVisibleInt(Node currentNode)
protected boolean isVisible(Node currentNode)
protected void handleParent(Element e, NameSpaceSymbTable ns)
protected static final void outputAttrToWriter(String name, String value, OutputStream writer, Map<String,byte[]> cache) throws IOException
&
<
"
#x9
, #xA, and #xD, with character
references. The character references are written in uppercase
hexadecimal with no leading zeroes (for example, #xD
is represented
by the character reference 
)name
- value
- writer
- IOException
protected void outputPItoWriter(ProcessingInstruction currentPI, OutputStream writer, int position) throws IOException
currentPI
- writer
- where to write the thingsIOException
protected void outputCommentToWriter(Comment currentComment, OutputStream writer, int position) throws IOException
currentComment
- writer
- writer where to write the thingsIOException
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.