List of utility methods to do Charset Get
Charset | getCharset(String enc) Returns the Java Charset that should be used for the provided encoding Charset charset = encodingToCharsetCache.get(enc); if (charset == null) { charset = Charset.forName(enc); encodingToCharsetCache.put(enc, charset); return charset; |
Charset | getLocaleCharset(String locale) get Locale Charset return charsetMap.containsKey(locale) ? charsetMap.get(locale)
: Charset.forName(locale);
|
boolean | isCharsetSupported() Returns true if charsets are supported in this JRE.
try { ZipFile.class.getConstructor(new Class[] { File.class, Charset.class }); return true; } catch (NoSuchMethodException e) { return false; |