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