public class Charsets extends Object
Constructor and Description |
---|
Charsets() |
Modifier and Type | Method and Description |
---|---|
static Charset |
toCharset(String charsetName)
Returns a charset object for the given charset name.
|
static Charset |
toCharset(String charsetName,
String defaultCharsetName)
Returns a charset object for the given charset name.
|
public static Charset toCharset(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 Charset toCharset(String charsetName, 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 nullCopyright © 2001–2021 The Apache Software Foundation. All rights reserved.