MalformedInputException

  • MalformedInputException is a checked exception indicating an illegal input byte or character sequence for a given charset.

  • It provides methods to get the length of the invalid input and a descriptive message.

  • This exception inherits from CharacterCodingException and ultimately from Throwable, providing standard exception handling functionalities.

public class MalformedInputException extends CharacterCodingException

Checked exception thrown when an input byte sequence is not legal for given charset, or an input character sequence is not a legal sixteen-bit Unicode sequence.

Public Constructor Summary

MalformedInputException(int inputLength)
Constructs an MalformedInputException with the given length.

Public Method Summary

int
getInputLength()
Returns the length of the input.
String
getMessage()
Returns the message.

Inherited Method Summary

Public Constructors

public MalformedInputException (int inputLength)

Constructs an MalformedInputException with the given length.

Parameters
inputLength the length of the input

Public Methods

public int getInputLength ()

Returns the length of the input.

Returns
  • the length of the input

public String getMessage ()

Returns the message.

Returns
  • the message