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
public abstract class AbstractSerializer extends java.lang.Object implements Serializer
ConvertsStrings intoNodes and visa versa. An abstract class for common Serializer functionality
-
-
Field Summary
Fields Modifier and Type Field Description private Canonicalizercanonprotected booleansecureValidation
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractSerializer(java.lang.String canonAlg, boolean secureValidation)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static byte[]createContext(byte[] source, org.w3c.dom.Node ctx)byte[]serializeToByteArray(org.w3c.dom.Element element)Returns abyte[]representation of the specifiedElement.byte[]serializeToByteArray(org.w3c.dom.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, wait
-
Methods inherited from interface org.apache.xml.security.encryption.Serializer
deserialize
-
-
-
-
Field Detail
-
canon
private final Canonicalizer canon
-
secureValidation
protected final boolean secureValidation
-
-
Constructor Detail
-
AbstractSerializer
protected AbstractSerializer(java.lang.String canonAlg, boolean secureValidation) throws InvalidCanonicalizerException- Throws:
InvalidCanonicalizerException
-
-
Method Detail
-
serializeToByteArray
public byte[] serializeToByteArray(org.w3c.dom.Element element) throws java.lang.ExceptionReturns abyte[]representation of the specifiedElement.- Specified by:
serializeToByteArrayin interfaceSerializer- Parameters:
element- theElementto serialize.- Returns:
- the
byte[]representation of the serilaizedElement. - Throws:
java.lang.Exception
-
serializeToByteArray
public byte[] serializeToByteArray(org.w3c.dom.NodeList content) throws java.lang.ExceptionReturns abyte[]representation of the specifiedNodeList.- Specified by:
serializeToByteArrayin interfaceSerializer- Parameters:
content- theNodeListto serialize.- Returns:
- the
byte[]representation of the serializedNodeList. - Throws:
java.lang.Exception
-
createContext
protected static byte[] createContext(byte[] source, org.w3c.dom.Node ctx) throws XMLEncryptionException- Throws:
XMLEncryptionException
-
-