Class XmlEscapeUtil


  • final class XmlEscapeUtil
    extends java.lang.Object

    Internal class in charge of performing the real escape/unescape operations.

    Since:
    1.0.0
    • Field Detail

      • REFERENCE_NUMERIC_PREFIX2

        private static final char REFERENCE_NUMERIC_PREFIX2
        See Also:
        Constant Field Values
      • REFERENCE_HEXA_PREFIX3

        private static final char REFERENCE_HEXA_PREFIX3
        See Also:
        Constant Field Values
      • REFERENCE_DECIMAL_PREFIX

        private static final char[] REFERENCE_DECIMAL_PREFIX
      • REFERENCE_HEXA_PREFIX

        private static final char[] REFERENCE_HEXA_PREFIX
      • HEXA_CHARS_UPPER

        private static char[] HEXA_CHARS_UPPER
      • HEXA_CHARS_LOWER

        private static char[] HEXA_CHARS_LOWER
    • Constructor Detail

      • XmlEscapeUtil

        private XmlEscapeUtil()
    • Method Detail

      • escape

        static void escape​(java.io.Reader reader,
                           java.io.Writer writer,
                           XmlEscapeSymbols symbols,
                           XmlEscapeType escapeType,
                           XmlEscapeLevel escapeLevel)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • escape

        static void escape​(char[] text,
                           int offset,
                           int len,
                           java.io.Writer writer,
                           XmlEscapeSymbols symbols,
                           XmlEscapeType escapeType,
                           XmlEscapeLevel escapeLevel)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • parseIntFromReference

        static int parseIntFromReference​(java.lang.String text,
                                         int start,
                                         int end,
                                         int radix)
      • parseIntFromReference

        static int parseIntFromReference​(char[] text,
                                         int start,
                                         int end,
                                         int radix)
      • unescape

        static java.lang.String unescape​(java.lang.String text,
                                         XmlEscapeSymbols symbols)
      • unescape

        static void unescape​(java.io.Reader reader,
                             java.io.Writer writer,
                             XmlEscapeSymbols symbols)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • unescape

        static void unescape​(char[] text,
                             int offset,
                             int len,
                             java.io.Writer writer,
                             XmlEscapeSymbols symbols)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • codePointAt

        private static int codePointAt​(char c1,
                                       char c2)