Package org.unbescape.java
Class JavaEscapeUtil
java.lang.Object
org.unbescape.java.JavaEscapeUtil
Internal class in charge of performing the real escape/unescape operations.
- Since:
- 1.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte[]
private static final char
private static final char
private static final char[]
private static final char
private static char[]
private static char[]
private static char[]
private static int
private static char
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
codePointAt
(char c1, char c2) (package private) static void
escape
(char[] text, int offset, int len, Writer writer, JavaEscapeLevel escapeLevel) (package private) static void
escape
(Reader reader, Writer writer, JavaEscapeLevel escapeLevel) (package private) static String
escape
(String text, JavaEscapeLevel escapeLevel) (package private) static boolean
isOctalEscape
(char[] text, int start, int end) (package private) static boolean
isOctalEscape
(String text, int start, int end) (package private) static int
parseIntFromReference
(char[] text, int start, int end, int radix) (package private) static int
parseIntFromReference
(String text, int start, int end, int radix) (package private) static boolean
requiresUnicodeUnescape
(char[] text, int offset, int len) (package private) static char[]
toUHexa
(int codepoint) (package private) static void
(package private) static void
(package private) static String
(package private) static void
unicodeUnescape
(char[] text, int offset, int len, Writer writer) (package private) static String
unicodeUnescape
(String text)
-
Field Details
-
ESCAPE_PREFIX
private static final char ESCAPE_PREFIX- See Also:
-
ESCAPE_UHEXA_PREFIX2
private static final char ESCAPE_UHEXA_PREFIX2- See Also:
-
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_LEN
private static final char ESCAPE_LEVELS_LEN- See Also:
-
ESCAPE_LEVELS
private static final byte[] ESCAPE_LEVELS
-
-
Constructor Details
-
JavaEscapeUtil
private JavaEscapeUtil()
-
-
Method Details
-
toUHexa
static char[] toUHexa(int codepoint) -
escape
-
escape
- Throws:
IOException
-
escape
static void escape(char[] text, int offset, int len, Writer writer, JavaEscapeLevel escapeLevel) throws IOException - Throws:
IOException
-
parseIntFromReference
-
parseIntFromReference
static int parseIntFromReference(char[] text, int start, int end, int radix) -
isOctalEscape
-
isOctalEscape
static boolean isOctalEscape(char[] text, int start, int end) -
unicodeUnescape
-
requiresUnicodeUnescape
static boolean requiresUnicodeUnescape(char[] text, int offset, int len) -
unicodeUnescape
- Throws:
IOException
-
unescape
-
unescape
- Throws:
IOException
-
unescape
- Throws:
IOException
-
codePointAt
private static int codePointAt(char c1, char c2)
-