Package com.fasterxml.aalto.util
Class CharsetNames
java.lang.Object
com.fasterxml.aalto.util.CharsetNames
- All Implemented Interfaces:
XmlConsts
Simple utility class that normalizes given character input character
set names into canonical (within context of this processor) names
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
This constants is intentionally vague, so that some other information will be needed to determine the endianness.static final String
static final String
static final String
static final String
static final String
static final String
private static final int
Internal constant used to denote END-OF-STRINGFields inherited from interface com.fasterxml.aalto.util.XmlConsts
CHAR_CR, CHAR_LF, CHAR_NULL, CHAR_SPACE, MAX_UNICODE_CHAR, STAX_DEFAULT_OUTPUT_ENCODING, STAX_DEFAULT_OUTPUT_VERSION, XML_DECL_KW_ENCODING, XML_DECL_KW_STANDALONE, XML_DECL_KW_VERSION, XML_SA_NO, XML_SA_YES, XML_V_10, XML_V_10_STR, XML_V_11, XML_V_11_STR, XML_V_UNKNOWN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
encodingStartsWith
(String enc, String prefix) static boolean
equalEncodings
(String str1, String str2) Method that implements a loose String comparison for encoding Strings.static String
Because of legacy encodings used by earlier JDK versions, we need to be careful when accessing encoding names via JDK classes.static String
-
Field Details
-
CS_US_ASCII
- See Also:
-
CS_UTF8
- See Also:
-
CS_UTF16
This constants is intentionally vague, so that some other information will be needed to determine the endianness.- See Also:
-
CS_UTF16BE
- See Also:
-
CS_UTF16LE
- See Also:
-
CS_UTF32
- See Also:
-
CS_UTF32BE
- See Also:
-
CS_UTF32LE
- See Also:
-
CS_ISO_LATIN1
- See Also:
-
CS_SHIFT_JIS
- See Also:
-
CS_EBCDIC
- See Also:
-
EOS
private static final int EOSInternal constant used to denote END-OF-STRING- See Also:
-
-
Constructor Details
-
CharsetNames
public CharsetNames()
-
-
Method Details
-
normalize
-
findEncodingFor
Because of legacy encodings used by earlier JDK versions, we need to be careful when accessing encoding names via JDK classes. -
equalEncodings
Method that implements a loose String comparison for encoding Strings. It will work likeString.equalsIgnoreCase(java.lang.String)
, except that it will also ignore all hyphen, underscore and space characters. -
encodingStartsWith
-