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 class
private 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.DocumentLevel
protected static final char
(package private) static final byte[]
protected boolean
private boolean
(package private) static final byte[]
private final CanonicalizerBase.C14NStack<XMLSecEvent>
protected static final String
protected static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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) private boolean
namespaceIsAbsolute
(String namespaceValue) protected static void
outputAttrToWriter
(String prefix, String name, String value, OutputStream writer, Map<String, byte[]> CACHE) protected static void
outputCommentToWriter
(XMLSecComment currentComment, OutputStream writer, CanonicalizerBase.DocumentLevel position) Method outputCommentToWriterprotected static void
outputPItoWriter
(XMLSecProcessingInstruction currentPI, OutputStream writer, 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 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:
setProperties
in interfaceTransformer
- Overrides:
setProperties
in classTransformIdentity
- Throws:
XMLSecurityException
-
setTransformer
- 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
- Specified by:
transform
in interfaceTransformer
- Overrides:
transform
in classTransformIdentity
- Throws:
XMLStreamException
-
transform
- Specified by:
transform
in interfaceTransformer
- Overrides:
transform
in classTransformIdentity
- Throws:
XMLStreamException
-
doFinal
- 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
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
-