Package com.itextpdf.text.exceptions
Class InvalidPdfException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- com.itextpdf.text.exceptions.InvalidPdfException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
UnsupportedPdfException
public class InvalidPdfException extends java.io.IOException
Typed exception used when opening an existing PDF document. Gets thrown when the document isn't a valid PDF document.- Since:
- 2.1.5
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Throwable
cause
private static long
serialVersionUID
a serial version UID
-
Constructor Summary
Constructors Constructor Description InvalidPdfException(java.lang.String message)
Creates an instance with a message and no causeInvalidPdfException(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
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
a serial version UID- See Also:
- Constant Field Values
-
cause
private final java.lang.Throwable cause
-
-
Constructor Detail
-
InvalidPdfException
public InvalidPdfException(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.
-
InvalidPdfException
public InvalidPdfException(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 classjava.lang.Throwable
- Returns:
- the cause of this exception
-
-