public class CharsetUtil extends Object
| Constructor and Description |
|---|
CharsetUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Charset |
getUtf8()
Simply returns the value of
Charset.forName(String) with value of UTF8_NAME. |
static Charset |
getUtf8OrDefault()
Returns the value of
getUtf8() if UTF8 is supported. |
public static final String UTF8_NAME
public static Charset getUtf8() throws UnsupportedCharsetException
Charset.forName(String) with value of UTF8_NAME.UnsupportedCharsetExceptionpublic static Charset getUtf8OrDefault()
getUtf8() if UTF8 is supported. Returns Charset.defaultCharset() otherwise.Copyright © 2015 JBoss by Red Hat. All rights reserved.