public final class CharTypes
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
CharTypes.AltEscapes |
Modifier and Type | Field and Description |
---|---|
private static byte[] |
HB |
private static char[] |
HC |
private static int[] |
sHexValues
Lookup table for the first 256 Unicode characters (ASCII / UTF-8)
range.
|
private static int[] |
sInputCodes
Lookup table used for determining which input characters
need special handling when contained in text segment.
|
private static int[] |
sInputCodesComment
Decoding table used to quickly determine characters that are
relevant within comment content.
|
private static int[] |
sInputCodesJsNames
To support non-default (and -standard) unquoted field names mode,
need to have alternate checking.
|
private static int[] |
sInputCodesUTF8
Additionally we can combine UTF-8 decoding info into similar
data table.
|
private static int[] |
sInputCodesUtf8JsNames
This table is similar to Latin-1, except that it marks all "high-bit"
code as ok.
|
private static int[] |
sInputCodesWS
Decoding table used for skipping white space and comments.
|
private static int[] |
sOutputEscapes128
Lookup table used for determining which output characters in
7-bit ASCII range need to be quoted.
|
Constructor and Description |
---|
CharTypes() |
Modifier and Type | Method and Description |
---|---|
static void |
appendQuoted(java.lang.StringBuilder sb,
java.lang.String content) |
static int |
charToHex(int ch) |
static byte[] |
copyHexBytes() |
static char[] |
copyHexChars() |
static int[] |
get7BitOutputEscapes()
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 to
get7BitOutputEscapes() when a non-standard quote character
is used. |
static int[] |
getInputCodeComment() |
static int[] |
getInputCodeLatin1() |
static int[] |
getInputCodeLatin1JsNames() |
static int[] |
getInputCodeUtf8() |
static int[] |
getInputCodeUtf8JsNames() |
static int[] |
getInputCodeWS() |
private static final char[] HC
private static final byte[] HB
private static final int[] sInputCodes
private static final int[] sInputCodesUTF8
private static final int[] sInputCodesJsNames
private static final int[] sInputCodesUtf8JsNames
private static final int[] sInputCodesComment
private static final int[] sInputCodesWS
private static final int[] sOutputEscapes128
private static final int[] sHexValues
NOTE: before 2.10.1, was of size 128, extended for simpler handling
public static int[] getInputCodeLatin1()
public static int[] getInputCodeUtf8()
public static int[] getInputCodeLatin1JsNames()
public static int[] getInputCodeUtf8JsNames()
public static int[] getInputCodeComment()
public static int[] getInputCodeWS()
public static int[] get7BitOutputEscapes()
public static int[] get7BitOutputEscapes(int quoteChar)
get7BitOutputEscapes()
when a non-standard quote character
is used.public static int charToHex(int ch)
public static void appendQuoted(java.lang.StringBuilder sb, java.lang.String content)
public static char[] copyHexChars()
public static byte[] copyHexBytes()