Class JsonEscapeUtil


  • final class JsonEscapeUtil
    extends java.lang.Object

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

    Since:
    1.0.0
    • Field Detail

      • ESCAPE_UHEXA_PREFIX

        private static final char[] ESCAPE_UHEXA_PREFIX
      • HEXA_CHARS_UPPER

        private static char[] HEXA_CHARS_UPPER
      • HEXA_CHARS_LOWER

        private static char[] HEXA_CHARS_LOWER
      • SEC_CHARS_LEN

        private static int SEC_CHARS_LEN
      • SEC_CHARS_NO_SEC

        private static char SEC_CHARS_NO_SEC
      • SEC_CHARS

        private static char[] SEC_CHARS
      • ESCAPE_LEVELS

        private static final byte[] ESCAPE_LEVELS
    • Constructor Detail

      • JsonEscapeUtil

        private JsonEscapeUtil()
    • Method Detail

      • toUHexa

        static char[] toUHexa​(int codepoint)
      • escape

        static void escape​(java.io.Reader reader,
                           java.io.Writer writer,
                           JsonEscapeType escapeType,
                           JsonEscapeLevel escapeLevel)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • escape

        static void escape​(char[] text,
                           int offset,
                           int len,
                           java.io.Writer writer,
                           JsonEscapeType escapeType,
                           JsonEscapeLevel 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)
      • parseIntFromReference

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

        static java.lang.String unescape​(java.lang.String text)
      • unescape

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

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

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