Module org.apache.santuario.xmlsec
Class AbstractSerializer
java.lang.Object
org.apache.xml.security.encryption.AbstractSerializer
- All Implemented Interfaces:
Serializer
- Direct Known Subclasses:
DocumentSerializer,TransformSerializer
Converts
Strings into Nodes and visa versa.
An abstract class for common Serializer functionality-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSerializer(String canonAlg, boolean secureValidation) -
Method Summary
Modifier and TypeMethodDescriptionprotected static byte[]createContext(byte[] source, Node ctx) byte[]serializeToByteArray(Element element) Returns abyte[]representation of the specifiedElement.byte[]serializeToByteArray(NodeList content) Returns abyte[]representation of the specifiedNodeList.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.xml.security.encryption.Serializer
deserialize
-
Field Details
-
secureValidation
protected final boolean secureValidation
-
-
Constructor Details
-
AbstractSerializer
protected AbstractSerializer(String canonAlg, boolean secureValidation) throws InvalidCanonicalizerException - Throws:
InvalidCanonicalizerException
-
-
Method Details
-
serializeToByteArray
Returns abyte[]representation of the specifiedElement.- Specified by:
serializeToByteArrayin interfaceSerializer- Parameters:
element- theElementto serialize.- Returns:
- the
byte[]representation of the serilaizedElement. - Throws:
Exception
-
serializeToByteArray
Returns abyte[]representation of the specifiedNodeList.- Specified by:
serializeToByteArrayin interfaceSerializer- Parameters:
content- theNodeListto serialize.- Returns:
- the
byte[]representation of the serializedNodeList. - Throws:
Exception
-
createContext
- Throws:
XMLEncryptionException
-