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 classCanonicalizerBase.C14NStack<E>private static classCanonicalizerBase.DocumentLevel
-
Field Summary
Fields Modifier and Type Field Description (package private) static byte[]__X9_(package private) static byte[]__XA_(package private) static byte[]__XD_(package private) static byte[]_AMP_(package private) static byte[]_BEGIN_COMM(package private) static byte[]_BEGIN_PI(package private) static byte[]_END_COMM(package private) static byte[]_END_PI(package private) static byte[]_END_TAG(package private) static byte[]_GT_(package private) static byte[]_LT_(package private) static byte[]_QUOT_private static java.util.Map<java.lang.String,byte[]>CACHEprivate CanonicalizerBase.DocumentLevelcurrentDocumentLevelprotected static charDOUBLEPOINT(package private) static byte[]EQUAL_STRINGprotected booleanfirstCallprivate booleanincludeComments(package private) static byte[]NEWLINEprivate CanonicalizerBase.C14NStack<XMLSecEvent>outputStackprotected static java.lang.StringXMLprotected static java.lang.StringXMLNS
-
Constructor Summary
Constructors Constructor Description CanonicalizerBase(boolean includeComments)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoFinal()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.TransformMethodgetPreferredTransformMethod(XMLSecurityConstants.TransformMethod forInput)private booleannamespaceIsAbsolute(java.lang.String namespaceValue)protected static voidoutputAttrToWriter(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 voidoutputCommentToWriter(XMLSecComment currentComment, java.io.OutputStream writer, CanonicalizerBase.DocumentLevel position)Method outputCommentToWriterprotected static voidoutputPItoWriter(XMLSecProcessingInstruction currentPI, java.io.OutputStream writer, CanonicalizerBase.DocumentLevel position)Outputs a PI to the internal Writer.protected static voidoutputTextToWriter(char[] text, java.io.OutputStream writer)protected static voidoutputTextToWriter(java.lang.String text, java.io.OutputStream writer)Outputs a Text of CDATA section to the internal Writer.voidsetProperties(java.util.Map<java.lang.String,java.lang.Object> properties)voidsetTransformer(Transformer transformer)voidtransform(java.io.InputStream inputStream)voidtransform(XMLSecEvent xmlSecEvent)-
Methods inherited from class org.apache.xml.security.stax.impl.transformer.TransformIdentity
getOutputStream, getTransformer, getXmlEventWriterForOutputStream, getXmlInputFactory, getXmlOutputFactory, setOutputStream
-
-
-
-
Field Detail
-
_END_PI
static final byte[] _END_PI
-
_BEGIN_PI
static final byte[] _BEGIN_PI
-
_END_COMM
static final byte[] _END_COMM
-
_BEGIN_COMM
static final byte[] _BEGIN_COMM
-
__XA_
static final byte[] __XA_
-
__X9_
static final byte[] __X9_
-
_QUOT_
static final byte[] _QUOT_
-
__XD_
static final byte[] __XD_
-
_GT_
static final byte[] _GT_
-
_LT_
static final byte[] _LT_
-
_END_TAG
static final byte[] _END_TAG
-
_AMP_
static final byte[] _AMP_
-
EQUAL_STRING
static final byte[] EQUAL_STRING
-
NEWLINE
static final byte[] NEWLINE
-
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
-
CACHE
private static final java.util.Map<java.lang.String,byte[]> CACHE
-
outputStack
private final CanonicalizerBase.C14NStack<XMLSecEvent> outputStack
-
includeComments
private boolean includeComments
-
currentDocumentLevel
private CanonicalizerBase.DocumentLevel currentDocumentLevel
-
firstCall
protected boolean firstCall
-
-
Method Detail
-
setProperties
public void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties) throws XMLSecurityException- Specified by:
setPropertiesin interfaceTransformer- Overrides:
setPropertiesin classTransformIdentity- Throws:
XMLSecurityException
-
setTransformer
public void setTransformer(Transformer transformer) throws XMLSecurityException
- Specified by:
setTransformerin interfaceTransformer- Overrides:
setTransformerin 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:
getPreferredTransformMethodin interfaceTransformer- Overrides:
getPreferredTransformMethodin classTransformIdentity
-
transform
public void transform(XMLSecEvent xmlSecEvent) throws javax.xml.stream.XMLStreamException
- Specified by:
transformin interfaceTransformer- Overrides:
transformin classTransformIdentity- Throws:
javax.xml.stream.XMLStreamException
-
transform
public void transform(java.io.InputStream inputStream) throws javax.xml.stream.XMLStreamException- Specified by:
transformin interfaceTransformer- Overrides:
transformin classTransformIdentity- Throws:
javax.xml.stream.XMLStreamException
-
doFinal
public void doFinal() throws javax.xml.stream.XMLStreamException- Specified by:
doFinalin interfaceTransformer- Overrides:
doFinalin 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.IOExceptionOutputs 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, 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, CanonicalizerBase.DocumentLevel position) throws java.io.IOException
Method outputCommentToWriter- Parameters:
currentComment-writer- writer where to write the things- Throws:
java.io.IOException
-
namespaceIsAbsolute
private boolean namespaceIsAbsolute(java.lang.String namespaceValue)
-
-