Package org.apache.commons.lang3
Class Charsets
- java.lang.Object
-
- org.apache.commons.lang3.Charsets
-
-
Constructor Summary
Constructors Constructor Description Charsets()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static CharsettoCharset(String charsetName)Returns the givencharsetor the default Charset ifcharsetis null.(package private) static CharsettoCharset(Charset charset)Returns the givencharsetor the default Charset ifcharsetis null.(package private) static StringtoCharsetName(String charsetName)Returns the givencharsetor the default Charset ifcharsetis null.
-
-
-
Method Detail
-
toCharset
static Charset toCharset(Charset charset)
Returns the givencharsetor the default Charset ifcharsetis null.- Parameters:
charset- a Charset or null.- Returns:
- the given
charsetor the default Charset ifcharsetis null.
-
toCharset
static Charset toCharset(String charsetName)
Returns the givencharsetor the default Charset ifcharsetis null.- Parameters:
charsetName- a Charset or null.- Returns:
- the given
charsetor the default Charset ifcharsetis null. - Throws:
UnsupportedCharsetException- If no support for the named charset is available in this instance of the Java virtual machine
-
-