Class InvalidImageException

  • All Implemented Interfaces:
    java.io.Serializable

    public class InvalidImageException
    extends java.lang.RuntimeException
    RuntimeException to indicate that the provided Image is invalid/corrupted. Should only be thrown/not caught when ignoring invalid images.
    Since:
    5.4.2
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      InvalidImageException​(java.lang.String message)
      Creates an instance with a message and no cause
      InvalidImageException​(java.lang.String message, java.lang.Throwable cause)
      Creates an exception with a message and a cause
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Throwable getCause()
      This method is included (instead of using super(message, cause) in the constructors) to support backwards compatabilty with JDK 1.5, which did not have cause constructors for Throwable
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • InvalidImageException

        public InvalidImageException​(java.lang.String message)
        Creates an instance with a message and no cause
        Parameters:
        message - the reason why the document isn't a PDF document according to iText.
      • InvalidImageException

        public InvalidImageException​(java.lang.String message,
                                     java.lang.Throwable cause)
        Creates an exception with a message and a cause
        Parameters:
        message - the reason why the document isn't a PDF document according to iText.
        cause - the cause of the exception, if any
    • Method Detail

      • getCause

        public java.lang.Throwable getCause()
        This method is included (instead of using super(message, cause) in the constructors) to support backwards compatabilty with JDK 1.5, which did not have cause constructors for Throwable
        Overrides:
        getCause in class java.lang.Throwable
        Returns:
        the cause of this exception