public class Charsets
extends java.lang.Object
Charsets.| Modifier and Type | Method | Description |
|---|---|---|
static java.lang.String |
getDisplayName(java.nio.charset.Charset charset) |
Returns the human-readable name of the given charset.
|
static java.util.List<java.nio.charset.Charset> |
getSupportedCharsets(java.util.Locale locale) |
Returns the list of charsets that support encoding and decoding strings in the given language and script.
|
public static java.lang.String getDisplayName(java.nio.charset.Charset charset)
NOTE: This method exists because Charset#displayName() is a synonym for Charset#name() in charsets provided by Oracle.
java.lang.IllegalArgumentException - if charset is nullpublic static java.util.List<java.nio.charset.Charset> getSupportedCharsets(java.util.Locale locale)
NOTE: If any of the returned charsets shall be used for encoding, make sure its Charset.canEncode() method returns true.
java.lang.IllegalArgumentException - if locale is null