IllegalCharsetNameException

  • IllegalCharsetNameException is an unchecked exception, meaning it does not need to be explicitly declared in a method's throws clause.

  • This exception is thrown when a string that is not a valid charset name is used as one.

  • It provides a method, getCharsetName(), to retrieve the invalid charset name that caused the exception.

  • IllegalCharsetNameException inherits from IllegalArgumentException and ultimately from Throwable, providing standard exception handling methods.

  • The constructor for IllegalCharsetNameException takes the invalid charset name as an argument.

public class IllegalCharsetNameException extends IllegalArgumentException

Unchecked exception thrown when a string that is not a legal charset name is used as such.

Public Constructor Summary

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

Public Method Summary

String
getCharsetName()
Retrieves the illegal charset name.

Inherited Method Summary

Public Constructors

public IllegalCharsetNameException (String charsetName)

Constructs an instance of this class.

Parameters
charsetName The illegal charset name

Public Methods

public String getCharsetName ()

Retrieves the illegal charset name.

Returns
  • The illegal charset name