public class Charsets
extends java.lang.Object
| Constructor and Description |
|---|
Charsets() |
| Modifier and Type | Method and Description |
|---|---|
static java.nio.charset.Charset |
toCharset(java.lang.String charsetName)
Returns a charset object for the given charset name.
|
static java.nio.charset.Charset |
toCharset(java.lang.String charsetName,
java.lang.String defaultCharsetName)
Returns a charset object for the given charset name.
|
public static java.nio.charset.Charset toCharset(java.lang.String charsetName)
charsetName - The name of the requested charset; may be a canonical name, an alias, or null. If null, return the
default charset.public static java.nio.charset.Charset toCharset(java.lang.String charsetName,
java.lang.String defaultCharsetName)
charsetName - The name of the requested charset; may be a canonical name, an alias, or null.
If null, return the default charset.defaultCharsetName - the charset name to use if the requested charset is null