Package org.apache.commons.lang3
Class Charsets
java.lang.Object
org.apache.commons.lang3.Charsets
Internal use only.
Provides utilities for Charset.
Package private since Apache Commons IO already provides a Charsets because Charset is in
java.nio.charset.
- Since:
- 3.10
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static CharsetReturns the givencharsetor the default Charset ifcharsetis null.(package private) static CharsetReturns the givencharsetor the default Charset ifcharsetis null.(package private) static StringtoCharsetName(String charsetName) Returns the givencharsetor the default Charset ifcharsetis null.
-
Constructor Details
-
Charsets
Charsets()
-
-
Method Details
-
toCharset
Returns the givencharsetor the default Charset ifcharsetis null.- Parameters:
charset- a Charset or null.- Returns:
- the given
charsetor the default Charset ifcharsetis null.
-
toCharset
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
-
toCharsetName
Returns the givencharsetor the default Charset ifcharsetis null.- Parameters:
charsetName- a Charset or null.- Returns:
- the given
charsetor the default Charset ifcharsetis null.
-