com.fasterxml.aalto.util
Class CharsetNames
java.lang.Object
com.fasterxml.aalto.util.CharsetNames
- All Implemented Interfaces:
- XmlConsts
public final class CharsetNames
- extends Object
- implements XmlConsts
Simple utility class that normalizes given character input character
set names into canonical (within context of this processor) names
| 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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CS_US_ASCII
public static final String CS_US_ASCII
- See Also:
- Constant Field Values
CS_UTF8
public static final String CS_UTF8
- See Also:
- Constant Field Values
CS_UTF16
public static final 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 String CS_UTF16BE
- See Also:
- Constant Field Values
CS_UTF16LE
public static final String CS_UTF16LE
- See Also:
- Constant Field Values
CS_UTF32
public static final String CS_UTF32
- See Also:
- Constant Field Values
CS_UTF32BE
public static final String CS_UTF32BE
- See Also:
- Constant Field Values
CS_UTF32LE
public static final String CS_UTF32LE
- See Also:
- Constant Field Values
CS_ISO_LATIN1
public static final String CS_ISO_LATIN1
- See Also:
- Constant Field Values
CS_SHIFT_JIS
public static final String CS_SHIFT_JIS
- See Also:
- Constant Field Values
CS_EBCDIC
public static final String CS_EBCDIC
- See Also:
- Constant Field Values
CharsetNames
public CharsetNames()
normalize
public static String normalize(String csName)
findEncodingFor
public static String findEncodingFor(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(String str1,
String str2)
- Method that implements a loose String comparison for encoding
Strings. It will work like
String.equalsIgnoreCase(java.lang.String),
except that it will also ignore all hyphen, underscore and
space characters.
encodingStartsWith
public static boolean encodingStartsWith(String enc,
String prefix)
Copyright © 2011 Fasterxml.com. All Rights Reserved.