public abstract class CharsetUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Charset |
getDefaultCharset() |
static String |
getDefaultEncoding()
Supplies the default encoding without using Charset.defaultCharset()
|
static Locale |
getDefaultLocale() |
static String |
getFileEncoding() |
static String |
getSunEncoding() |
static Charset |
toCharset(Charset charset)
Returns the given Charset or the default Charset if the given Charset is null.
|
static Charset |
toCharset(String charset)
Returns a Charset for the named charset.
|
public static Charset toCharset(String charset)
charset - The name of the requested charset, may be null.UnsupportedCharsetException - If the named charset is unavailablepublic static Charset toCharset(Charset charset)
charset - A charset or null.public static String getDefaultEncoding()
and without accessing System.getProperty("file.encoding").
public static Locale getDefaultLocale()
public static Charset getDefaultCharset()
public static String getSunEncoding()
public static String getFileEncoding()
Copyright © 2020. All rights reserved.