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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprivate static enum -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final byte[](package private) static final byte[](package private) static final byte[](package private) static final byte[](package private) static final byte[](package private) static final byte[](package private) static final byte[](package private) static final byte[](package private) static final byte[](package private) static final byte[](package private) static final byte[](package private) static final byte[]private CanonicalizerBase.DocumentLevelprotected static final char(package private) static final byte[]protected booleanprivate boolean(package private) static final byte[]private final CanonicalizerBase.C14NStack<XMLSecEvent> protected static final Stringprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoFinal()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) private booleannamespaceIsAbsolute(String namespaceValue) protected static voidoutputAttrToWriter(String prefix, String name, String value, OutputStream writer, Map<String, byte[]> CACHE) protected static voidoutputCommentToWriter(XMLSecComment currentComment, OutputStream writer, CanonicalizerBase.DocumentLevel position) Method outputCommentToWriterprotected static voidoutputPItoWriter(XMLSecProcessingInstruction currentPI, OutputStream writer, CanonicalizerBase.DocumentLevel position) Outputs a PI to the internal Writer.protected static voidoutputTextToWriter(char[] text, OutputStream writer) protected static voidoutputTextToWriter(String text, OutputStream writer) Outputs a Text of CDATA section to the internal Writer.voidsetProperties(Map<String, Object> properties) voidsetTransformer(Transformer transformer) voidtransform(InputStream inputStream) voidtransform(XMLSecEvent xmlSecEvent) Methods inherited from class TransformIdentity
getOutputStream, getTransformer, getXmlEventWriterForOutputStream, getXmlInputFactory, getXmlOutputFactory, setOutputStream
-
Field Details
-
_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
- See Also:
-
XMLNS
- See Also:
-
DOUBLEPOINT
protected static final char DOUBLEPOINT- See Also:
-
CACHE
-
outputStack
-
includeComments
private boolean includeComments -
currentDocumentLevel
-
firstCall
protected boolean firstCall
-
-
Constructor Details
-
CanonicalizerBase
public CanonicalizerBase(boolean includeComments)
-
-
Method Details
-
setProperties
- Specified by:
setPropertiesin interfaceTransformer- Overrides:
setPropertiesin classTransformIdentity- Throws:
XMLSecurityException
-
setTransformer
- Specified by:
setTransformerin interfaceTransformer- Overrides:
setTransformerin 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:
getPreferredTransformMethodin interfaceTransformer- Overrides:
getPreferredTransformMethodin classTransformIdentity
-
transform
- Specified by:
transformin interfaceTransformer- Overrides:
transformin classTransformIdentity- Throws:
XMLStreamException
-
transform
- Specified by:
transformin interfaceTransformer- Overrides:
transformin classTransformIdentity- Throws:
XMLStreamException
-
doFinal
- Specified by:
doFinalin interfaceTransformer- Overrides:
doFinalin 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
Outputs a Text of CDATA section to the internal Writer.- Parameters:
text-writer- writer where to write the things- Throws:
IOException
-
outputTextToWriter
- Throws:
IOException
-
outputPItoWriter
protected static void outputPItoWriter(XMLSecProcessingInstruction currentPI, OutputStream writer, 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, CanonicalizerBase.DocumentLevel position) throws IOException Method outputCommentToWriter- Parameters:
currentComment-writer- writer where to write the things- Throws:
IOException
-
namespaceIsAbsolute
-