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
      • isCommentStart

        protected static boolean isCommentStart​(java.io.InputStream in,
                                                java.lang.StringBuilder sb,
                                                boolean drop)
                                         throws java.io.IOException
        Searches for a sequence of '!--'
        Throws:
        java.io.IOException
      • isCommentEnd

        protected static boolean isCommentEnd​(java.io.InputStream in,
                                              java.lang.StringBuilder sb,
                                              boolean drop)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • find

        protected static boolean find​(char starting_ch,
                                      java.lang.String s,
                                      java.io.InputStream in,
                                      java.lang.StringBuilder sb,
                                      boolean drop)
                               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
      • main

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