Class CanonicalizerBase
- java.lang.Object
-
- org.apache.xml.security.stax.impl.transformer.TransformIdentity
-
- org.apache.xml.security.stax.impl.transformer.canonicalizer.CanonicalizerBase
-
- All Implemented Interfaces:
Transformer
- Direct Known Subclasses:
Canonicalizer11
,Canonicalizer20010315
,Canonicalizer20010315_Excl
public abstract class CanonicalizerBase extends TransformIdentity
- Version:
- $Revision: 1720201 $ $Date: 2015-12-15 18:13:17 +0100 (Tue, 15 Dec 2015) $
- Author:
- $Author: coheigea $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CanonicalizerBase.C14NStack<E>
-
Constructor Summary
Constructors Constructor Description CanonicalizerBase(boolean includeComments)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doFinal()
protected List<XMLSecAttribute>
getCurrentUtilizedAttributes(XMLSecStartElement xmlSecStartElement, CanonicalizerBase.C14NStack<XMLSecEvent> outputStack)
protected List<XMLSecNamespace>
getCurrentUtilizedNamespaces(XMLSecStartElement xmlSecStartElement, CanonicalizerBase.C14NStack<XMLSecEvent> outputStack)
protected List<XMLSecAttribute>
getInitialUtilizedAttributes(XMLSecStartElement xmlSecStartElement, CanonicalizerBase.C14NStack<XMLSecEvent> outputStack)
protected List<XMLSecNamespace>
getInitialUtilizedNamespaces(XMLSecStartElement xmlSecStartElement, CanonicalizerBase.C14NStack<XMLSecEvent> outputStack)
XMLSecurityConstants.TransformMethod
getPreferredTransformMethod(XMLSecurityConstants.TransformMethod forInput)
protected static void
outputAttrToWriter(String prefix, String name, String value, OutputStream writer, Map<String,byte[]> cache)
protected static void
outputCommentToWriter(XMLSecComment currentComment, OutputStream writer, org.apache.xml.security.stax.impl.transformer.canonicalizer.CanonicalizerBase.DocumentLevel position)
Method outputCommentToWriterprotected static void
outputPItoWriter(XMLSecProcessingInstruction currentPI, OutputStream writer, org.apache.xml.security.stax.impl.transformer.canonicalizer.CanonicalizerBase.DocumentLevel position)
Outputs a PI to the internal Writer.protected static void
outputTextToWriter(char[] text, OutputStream writer)
protected static void
outputTextToWriter(String text, OutputStream writer)
Outputs a Text of CDATA section to the internal Writer.void
setProperties(Map<String,Object> properties)
void
setTransformer(Transformer transformer)
void
transform(InputStream inputStream)
void
transform(XMLSecEvent xmlSecEvent)
-
Methods inherited from class org.apache.xml.security.stax.impl.transformer.TransformIdentity
getOutputStream, getTransformer, getXmlEventWriterForOutputStream, getXmlInputFactory, getXmlOutputFactory, setOutputStream
-
-
-
-
Field Detail
-
XML
protected static final String XML
- See Also:
- Constant Field Values
-
XMLNS
protected static final String XMLNS
- See Also:
- Constant Field Values
-
DOUBLEPOINT
protected static final char DOUBLEPOINT
- See Also:
- Constant Field Values
-
firstCall
protected boolean firstCall
-
-
Method Detail
-
setProperties
public void setProperties(Map<String,Object> properties) throws XMLSecurityException
- Specified by:
setProperties
in interfaceTransformer
- Overrides:
setProperties
in classTransformIdentity
- Throws:
XMLSecurityException
-
setTransformer
public void setTransformer(Transformer transformer) throws XMLSecurityException
- Specified by:
setTransformer
in interfaceTransformer
- Overrides:
setTransformer
in classTransformIdentity
- Throws:
XMLSecurityException
-
getCurrentUtilizedNamespaces
protected List<XMLSecNamespace> getCurrentUtilizedNamespaces(XMLSecStartElement xmlSecStartElement, CanonicalizerBase.C14NStack<XMLSecEvent> outputStack)
-
getCurrentUtilizedAttributes
protected List<XMLSecAttribute> getCurrentUtilizedAttributes(XMLSecStartElement xmlSecStartElement, CanonicalizerBase.C14NStack<XMLSecEvent> outputStack)
-
getInitialUtilizedNamespaces
protected List<XMLSecNamespace> getInitialUtilizedNamespaces(XMLSecStartElement xmlSecStartElement, CanonicalizerBase.C14NStack<XMLSecEvent> outputStack)
-
getInitialUtilizedAttributes
protected List<XMLSecAttribute> getInitialUtilizedAttributes(XMLSecStartElement xmlSecStartElement, CanonicalizerBase.C14NStack<XMLSecEvent> outputStack)
-
getPreferredTransformMethod
public XMLSecurityConstants.TransformMethod getPreferredTransformMethod(XMLSecurityConstants.TransformMethod forInput)
- Specified by:
getPreferredTransformMethod
in interfaceTransformer
- Overrides:
getPreferredTransformMethod
in classTransformIdentity
-
transform
public void transform(XMLSecEvent xmlSecEvent) throws XMLStreamException
- Specified by:
transform
in interfaceTransformer
- Overrides:
transform
in classTransformIdentity
- Throws:
XMLStreamException
-
transform
public void transform(InputStream inputStream) throws XMLStreamException
- Specified by:
transform
in interfaceTransformer
- Overrides:
transform
in classTransformIdentity
- Throws:
XMLStreamException
-
doFinal
public void doFinal() throws XMLStreamException
- Specified by:
doFinal
in interfaceTransformer
- Overrides:
doFinal
in classTransformIdentity
- Throws:
XMLStreamException
-
outputAttrToWriter
protected static void outputAttrToWriter(String prefix, String name, String value, OutputStream writer, Map<String,byte[]> cache) throws IOException
- Throws:
IOException
-
outputTextToWriter
protected static void outputTextToWriter(String text, OutputStream writer) throws IOException
Outputs a Text of CDATA section to the internal Writer.- Parameters:
text
-writer
- writer where to write the things- Throws:
IOException
-
outputTextToWriter
protected static void outputTextToWriter(char[] text, OutputStream writer) throws IOException
- Throws:
IOException
-
outputPItoWriter
protected static void outputPItoWriter(XMLSecProcessingInstruction currentPI, OutputStream writer, org.apache.xml.security.stax.impl.transformer.canonicalizer.CanonicalizerBase.DocumentLevel position) throws IOException
Outputs a PI to the internal Writer.- Parameters:
currentPI
-writer
- where to write the things- Throws:
IOException
-
outputCommentToWriter
protected static void outputCommentToWriter(XMLSecComment currentComment, OutputStream writer, org.apache.xml.security.stax.impl.transformer.canonicalizer.CanonicalizerBase.DocumentLevel position) throws IOException
Method outputCommentToWriter- Parameters:
currentComment
-writer
- writer where to write the things- Throws:
IOException
-
-