Package java.nio.charset
Class MalformedInputException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- java.nio.charset.CharacterCodingException
-
- java.nio.charset.MalformedInputException
-
- All Implemented Interfaces:
Serializable
public class MalformedInputException extends CharacterCodingException
AMalformedInputExceptionis thrown when a malformed input is encountered, for example if a byte sequence is illegal for the given charset.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MalformedInputException(int length)Constructs a newMalformedInputException.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetInputLength()Gets the length of the malformed input.StringgetMessage()Returns the detail message which was provided when thisThrowablewas created.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
getInputLength
public int getInputLength()
Gets the length of the malformed input.- Returns:
- the length of the malformed input.
-
getMessage
public String getMessage()
Description copied from class:ThrowableReturns the detail message which was provided when thisThrowablewas created. Returnsnullif no message was provided at creation time.- Overrides:
getMessagein classThrowable
-
-