Package com.fasterxml.jackson.core.io
Class CharTypes
java.lang.Object
com.fasterxml.jackson.core.io.CharTypes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidappendQuoted(StringBuilder sb, String content) Helper method for appending JSON-escaped version of contents into specificStringBuilder, using default JSON specification mandated minimum escaping rules.static intcharToHex(int ch) static byte[]Deprecated.static byte[]copyHexBytes(boolean uppercase) static char[]Deprecated.Since 2.14 UsecopyHexChars(boolean)insteadstatic char[]copyHexChars(boolean uppercase) static int[]Accessor for getting a read-only encoding table for first 128 Unicode code points (single-byte UTF-8 characters).static int[]get7BitOutputEscapes(int quoteChar) Alternative toget7BitOutputEscapes()when a non-standard quote character is used.static int[]get7BitOutputEscapes(int quoteChar, boolean escapeSlash) Alternative toget7BitOutputEscapes()when either a non-standard quote character is used, or forward slash is to be escaped.static int[]static int[]static int[]static int[]static int[]static int[]static charhexToChar(int ch)
-
Constructor Details
-
CharTypes
public CharTypes()
-
-
Method Details
-
getInputCodeLatin1
public static int[] getInputCodeLatin1() -
getInputCodeUtf8
public static int[] getInputCodeUtf8() -
getInputCodeLatin1JsNames
public static int[] getInputCodeLatin1JsNames() -
getInputCodeUtf8JsNames
public static int[] getInputCodeUtf8JsNames() -
getInputCodeComment
public static int[] getInputCodeComment() -
getInputCodeWS
public static int[] getInputCodeWS() -
get7BitOutputEscapes
public static int[] get7BitOutputEscapes()Accessor for getting a read-only encoding table for first 128 Unicode code points (single-byte UTF-8 characters). Value of 0 means "no escaping"; other positive values that value is character to use after backslash; and negative values that generic (backslash - u) escaping is to be used.- Returns:
- 128-entry
int[]that contains escape definitions
-
get7BitOutputEscapes
public static int[] get7BitOutputEscapes(int quoteChar) Alternative toget7BitOutputEscapes()when a non-standard quote character is used.- Parameters:
quoteChar- Character used for quoting textual values and property names; usually double-quote but sometimes changed to single-quote (apostrophe)- Returns:
- 128-entry
int[]that contains escape definitions - Since:
- 2.10
-
get7BitOutputEscapes
public static int[] get7BitOutputEscapes(int quoteChar, boolean escapeSlash) Alternative toget7BitOutputEscapes()when either a non-standard quote character is used, or forward slash is to be escaped.- Parameters:
quoteChar- Character used for quoting textual values and property names; usually double-quote but sometimes changed to single-quote (apostrophe)escapeSlash-- Returns:
- 128-entry
int[]that contains escape definitions - Since:
- 2.17
-
charToHex
public static int charToHex(int ch) -
hexToChar
public static char hexToChar(int ch) -
appendQuoted
Helper method for appending JSON-escaped version of contents into specificStringBuilder, using default JSON specification mandated minimum escaping rules.- Parameters:
sb- Buffer to append escaped contents incontent- Unescaped String value to append with escaping applied
-
copyHexChars
Deprecated.Since 2.14 UsecopyHexChars(boolean)instead- Returns:
- Copy of array of 16 upper-case hexadecimal characters
-
copyHexChars
public static char[] copyHexChars(boolean uppercase) -
copyHexBytes
Deprecated.Since 2.14 UsecopyHexBytes(boolean)instead- Returns:
- Copy of array of 16 upper-case hexadecimal characters as bytes
-
copyHexBytes
public static byte[] copyHexBytes(boolean uppercase)
-
copyHexBytes(boolean)instead