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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CanonicalizerBase.C14NStack<E>
-
Field Summary
Fields Modifier and Type Field Description protected static char
DOUBLEPOINT
protected boolean
firstCall
protected static java.lang.String
XML
protected static java.lang.String
XMLNS
-
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 java.util.List<XMLSecAttribute>
getCurrentUtilizedAttributes(XMLSecStartElement xmlSecStartElement, CanonicalizerBase.C14NStack<XMLSecEvent> outputStack)
protected java.util.List<XMLSecNamespace>
getCurrentUtilizedNamespaces(XMLSecStartElement xmlSecStartElement, CanonicalizerBase.C14NStack<XMLSecEvent> outputStack)
protected java.util.List<XMLSecAttribute>
getInitialUtilizedAttributes(XMLSecStartElement xmlSecStartElement, CanonicalizerBase.C14NStack<XMLSecEvent> outputStack)
protected java.util.List<XMLSecNamespace>
getInitialUtilizedNamespaces(XMLSecStartElement xmlSecStartElement, CanonicalizerBase.C14NStack<XMLSecEvent> outputStack)
XMLSecurityConstants.TransformMethod
getPreferredTransformMethod(XMLSecurityConstants.TransformMethod forInput)
protected static void
outputAttrToWriter(java.lang.String prefix, java.lang.String name, java.lang.String value, java.io.OutputStream writer, java.util.Map<java.lang.String,byte[]> CACHE)
protected static void
outputCommentToWriter(XMLSecComment currentComment, java.io.OutputStream writer, org.apache.xml.security.stax.impl.transformer.canonicalizer.CanonicalizerBase.DocumentLevel position)
Method outputCommentToWriterprotected static void
outputPItoWriter(XMLSecProcessingInstruction currentPI, java.io.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, java.io.OutputStream writer)
protected static void
outputTextToWriter(java.lang.String text, java.io.OutputStream writer)
Outputs a Text of CDATA section to the internal Writer.void
setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
void
setTransformer(Transformer transformer)
void
transform(java.io.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 java.lang.String XML
- See Also:
- Constant Field Values
-
XMLNS
protected static final java.lang.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(java.util.Map<java.lang.String,java.lang.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 java.util.List<XMLSecNamespace> getCurrentUtilizedNamespaces(XMLSecStartElement xmlSecStartElement, CanonicalizerBase.C14NStack<XMLSecEvent> outputStack)
-
getCurrentUtilizedAttributes
protected java.util.List<XMLSecAttribute> getCurrentUtilizedAttributes(XMLSecStartElement xmlSecStartElement, CanonicalizerBase.C14NStack<XMLSecEvent> outputStack)
-
getInitialUtilizedNamespaces
protected java.util.List<XMLSecNamespace> getInitialUtilizedNamespaces(XMLSecStartElement xmlSecStartElement, CanonicalizerBase.C14NStack<XMLSecEvent> outputStack)
-
getInitialUtilizedAttributes
protected java.util.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 javax.xml.stream.XMLStreamException
- Specified by:
transform
in interfaceTransformer
- Overrides:
transform
in classTransformIdentity
- Throws:
javax.xml.stream.XMLStreamException
-
transform
public void transform(java.io.InputStream inputStream) throws javax.xml.stream.XMLStreamException
- Specified by:
transform
in interfaceTransformer
- Overrides:
transform
in classTransformIdentity
- Throws:
javax.xml.stream.XMLStreamException
-
doFinal
public void doFinal() throws javax.xml.stream.XMLStreamException
- Specified by:
doFinal
in interfaceTransformer
- Overrides:
doFinal
in classTransformIdentity
- Throws:
javax.xml.stream.XMLStreamException
-
outputAttrToWriter
protected static void outputAttrToWriter(java.lang.String prefix, java.lang.String name, java.lang.String value, java.io.OutputStream writer, java.util.Map<java.lang.String,byte[]> CACHE) throws java.io.IOException
- Throws:
java.io.IOException
-
outputTextToWriter
protected static void outputTextToWriter(java.lang.String text, java.io.OutputStream writer) throws java.io.IOException
Outputs a Text of CDATA section to the internal Writer.- Parameters:
text
-writer
- writer where to write the things- Throws:
java.io.IOException
-
outputTextToWriter
protected static void outputTextToWriter(char[] text, java.io.OutputStream writer) throws java.io.IOException
- Throws:
java.io.IOException
-
outputPItoWriter
protected static void outputPItoWriter(XMLSecProcessingInstruction currentPI, java.io.OutputStream writer, org.apache.xml.security.stax.impl.transformer.canonicalizer.CanonicalizerBase.DocumentLevel position) throws java.io.IOException
Outputs a PI to the internal Writer.- Parameters:
currentPI
-writer
- where to write the things- Throws:
java.io.IOException
-
outputCommentToWriter
protected static void outputCommentToWriter(XMLSecComment currentComment, java.io.OutputStream writer, org.apache.xml.security.stax.impl.transformer.canonicalizer.CanonicalizerBase.DocumentLevel position) throws java.io.IOException
Method outputCommentToWriter- Parameters:
currentComment
-writer
- writer where to write the things- Throws:
java.io.IOException
-
-