Class AbstractSerializer

  • All Implemented Interfaces:
    Serializer
    Direct Known Subclasses:
    DocumentSerializer, TransformSerializer

    public abstract class AbstractSerializer
    extends java.lang.Object
    implements Serializer
    Converts Strings into Nodes and visa versa. An abstract class for common Serializer functionality
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractSerializer​(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 a byte[] representation of the specified Element.
      byte[] serializeToByteArray​(org.w3c.dom.NodeList content)
      Returns a byte[] representation of the specified NodeList.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • secureValidation

        protected final boolean secureValidation
    • Method Detail

      • serializeToByteArray

        public byte[] serializeToByteArray​(org.w3c.dom.Element element)
                                    throws java.lang.Exception
        Returns a byte[] representation of the specified Element.
        Specified by:
        serializeToByteArray in interface Serializer
        Parameters:
        element - the Element to serialize.
        Returns:
        the byte[] representation of the serilaized Element.
        Throws:
        java.lang.Exception
      • serializeToByteArray

        public byte[] serializeToByteArray​(org.w3c.dom.NodeList content)
                                    throws java.lang.Exception
        Returns a byte[] representation of the specified NodeList.
        Specified by:
        serializeToByteArray in interface Serializer
        Parameters:
        content - the NodeList to serialize.
        Returns:
        the byte[] representation of the serialized NodeList.
        Throws:
        java.lang.Exception