Class XmlConfigurator

    • Field Detail

      • log

        protected static final Log log
    • Constructor Detail

    • Method Detail

      • getInstance

        public static XmlConfigurator getInstance​(java.io.InputStream stream)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • getProtocolStackString

        public java.lang.String getProtocolStackString​(boolean convert)
        Parameters:
        convert - If false: print old plain output, else print new XML format
        Returns:
        String with protocol stack in specified format
      • parse

        protected static XmlConfigurator parse​(java.io.InputStream stream)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • parse

        protected static XmlConfigurator parse​(XmlNode root)
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • parseProtocols

        public static java.util.List<ProtocolConfiguration> parseProtocols​(XmlNode root)
                                                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • parseXmlDocument

        public static XmlNode parseXmlDocument​(java.io.InputStream in)
                                        throws java.io.IOException
        Reads XML and returns a simple tree of XmlNodes
        Throws:
        java.io.IOException
      • readNode

        protected static java.lang.String readNode​(java.io.InputStream in)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • sanitize

        protected static java.lang.String sanitize​(java.lang.String s)
        Fixes errors like "/ >" with "/>"
      • readAttribute

        protected static Tuple<java.lang.String,​java.lang.String> readAttribute​(java.io.InputStream in)
                                                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • readQuotedString

        protected static java.lang.String readQuotedString​(java.io.InputStream in)
                                                    throws java.io.IOException
        Reads the characters between a start and end quote ("). Skips chars escaped with '\'
        Throws:
        java.io.IOException
      • isClosed

        protected static boolean isClosed​(java.lang.String s)
      • isComment

        protected static boolean isComment​(java.lang.String s)
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • replace

        public static java.lang.String replace​(java.lang.String input,
                                               java.lang.String expr,
                                               java.lang.String replacement)