UnsupportedCharsetException

  • UnsupportedCharsetException signals that a requested character set is not supported by the Java runtime.

  • It is an unchecked exception, meaning it does not need to be explicitly caught in a try-catch block.

  • The exception provides a method, getCharsetName(), to retrieve the name of the unsupported character set.

  • It inherits various methods from IllegalArgumentException and Throwable for exception handling and diagnostics.

public class UnsupportedCharsetException extends IllegalArgumentException

Unchecked exception thrown when no support is available for a requested charset.

Public Constructor Summary

UnsupportedCharsetException(String charsetName)
Constructs an instance of this class.

Public Method Summary

String
getCharsetName()
Retrieves the name of the unsupported charset.

Inherited Method Summary

Public Constructors

public UnsupportedCharsetException (String charsetName)

Constructs an instance of this class.

Parameters
charsetName The name of the unsupported charset

Public Methods

public String getCharsetName ()

Retrieves the name of the unsupported charset.

Returns
  • The name of the unsupported charset