Top Description Constructors Methods
org.apache.commons.lang3

pack-priv final Class Charsets

extends Object
Class Inheritance
Imports
java.nio.charset.Charset, .UnsupportedCharsetException

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

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static Charset

Returns:

the given charset or the default Charset if charset is null.
toCharset
(final Charset
a Charset or null.
charset
)

Returns the given charset or the default Charset if charset is null.

pack-priv static Charset

Returns:

the given charset or the default Charset if charset is null.
toCharset
(final String
a Charset or null.
charsetName
)

Returns the given charset or the default Charset if charset is null.

pack-priv static String

Returns:

the given charset or the default Charset if charset is null.
toCharsetName
(final String
a Charset or null.
charsetName
)

Returns the given charset or the default Charset if charset is null.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Charsetsback to summary
pack-priv Charsets()

Method Detail

toCharsetback to summary
pack-priv static Charset toCharset(final Charset charset)

Returns the given charset or the default Charset if charset is null.

Parameters
charset:Charset

a Charset or null.

Returns:Charset

the given charset or the default Charset if charset is null.

toCharsetback to summary
pack-priv static Charset toCharset(final String charsetName)

Returns the given charset or the default Charset if charset is null.

Parameters
charsetName:String

a Charset or null.

Returns:Charset

the given charset or the default Charset if charset is null.

Exceptions
UnsupportedCharsetException:
If no support for the named charset is available in this instance of the Java virtual machine
toCharsetNameback to summary
pack-priv static String toCharsetName(final String charsetName)

Returns the given charset or the default Charset if charset is null.

Parameters
charsetName:String

a Charset or null.

Returns:String

the given charset or the default Charset if charset is null.