Package com.fasterxml.aalto.util
Class CharsetNames
- java.lang.Object
-
- com.fasterxml.aalto.util.CharsetNames
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCS_EBCDICstatic java.lang.StringCS_ISO_LATIN1static java.lang.StringCS_SHIFT_JISstatic java.lang.StringCS_US_ASCIIstatic java.lang.StringCS_UTF16This constants is intentionally vague, so that some other information will be needed to determine the endianness.static java.lang.StringCS_UTF16BEstatic java.lang.StringCS_UTF16LEstatic java.lang.StringCS_UTF32static java.lang.StringCS_UTF32BEstatic java.lang.StringCS_UTF32LEstatic java.lang.StringCS_UTF8private static intEOSInternal constant used to denote END-OF-STRING-
Fields 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 Constructor Description CharsetNames()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanencodingStartsWith(java.lang.String enc, java.lang.String prefix)static booleanequalEncodings(java.lang.String str1, java.lang.String str2)Method that implements a loose String comparison for encoding Strings.static java.lang.StringfindEncodingFor(java.io.Writer w)Because of legacy encodings used by earlier JDK versions, we need to be careful when accessing encoding names via JDK classes.static java.lang.Stringnormalize(java.lang.String csName)
-
-
-
Field Detail
-
CS_US_ASCII
public static final java.lang.String CS_US_ASCII
- See Also:
- Constant Field Values
-
CS_UTF8
public static final java.lang.String CS_UTF8
- See Also:
- Constant Field Values
-
CS_UTF16
public static final java.lang.String CS_UTF16
This constants is intentionally vague, so that some other information will be needed to determine the endianness.- See Also:
- Constant Field Values
-
CS_UTF16BE
public static final java.lang.String CS_UTF16BE
- See Also:
- Constant Field Values
-
CS_UTF16LE
public static final java.lang.String CS_UTF16LE
- See Also:
- Constant Field Values
-
CS_UTF32
public static final java.lang.String CS_UTF32
- See Also:
- Constant Field Values
-
CS_UTF32BE
public static final java.lang.String CS_UTF32BE
- See Also:
- Constant Field Values
-
CS_UTF32LE
public static final java.lang.String CS_UTF32LE
- See Also:
- Constant Field Values
-
CS_ISO_LATIN1
public static final java.lang.String CS_ISO_LATIN1
- See Also:
- Constant Field Values
-
CS_SHIFT_JIS
public static final java.lang.String CS_SHIFT_JIS
- See Also:
- Constant Field Values
-
CS_EBCDIC
public static final java.lang.String CS_EBCDIC
- See Also:
- Constant Field Values
-
EOS
private static final int EOS
Internal constant used to denote END-OF-STRING- See Also:
- Constant Field Values
-
-
Method Detail
-
normalize
public static java.lang.String normalize(java.lang.String csName)
-
findEncodingFor
public static java.lang.String findEncodingFor(java.io.Writer w)
Because of legacy encodings used by earlier JDK versions, we need to be careful when accessing encoding names via JDK classes.
-
equalEncodings
public static boolean equalEncodings(java.lang.String str1, java.lang.String str2)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
public static boolean encodingStartsWith(java.lang.String enc, java.lang.String prefix)
-
-