Package com.snowtide.pdf
Enum EncryptedPDFException.ErrorType
- java.lang.Object
-
- java.lang.Enum<EncryptedPDFException.ErrorType>
-
- com.snowtide.pdf.EncryptedPDFException.ErrorType
-
- All Implemented Interfaces:
Serializable
,Comparable<EncryptedPDFException.ErrorType>
- Enclosing class:
- EncryptedPDFException
public static enum EncryptedPDFException.ErrorType extends Enum<EncryptedPDFException.ErrorType>
An enumeration of the set of possibleerror types
that can be indicated by a thrownEncryptedPDFException
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BadPassword
Error type indicating that aDocument
was opened without a password when one was needed, or that the instance was created with an incorrect password.SecurityAPIFailure
Error type indicating that the encrypted PDF could not be decrypted because of a failure of the current JDK's security implementation.Syntax
Error type indicating that a necessary decryption parameter either could not be found within the source PDF document, or has an invalid value.Unspecified
Error type indicating an unspecified encryption error.Unsupported
Error type indicating that a PDF file is encrypted using a method that is unsupported by the current version of PDFxStream.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static EncryptedPDFException.ErrorType
valueOf(String name)
Returns the enum constant of this type with the specified name.static EncryptedPDFException.ErrorType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Unspecified
public static final EncryptedPDFException.ErrorType Unspecified
Error type indicating an unspecified encryption error.
-
BadPassword
public static final EncryptedPDFException.ErrorType BadPassword
Error type indicating that aDocument
was opened without a password when one was needed, or that the instance was created with an incorrect password.
-
SecurityAPIFailure
public static final EncryptedPDFException.ErrorType SecurityAPIFailure
Error type indicating that the encrypted PDF could not be decrypted because of a failure of the current JDK's security implementation. Details are typically included in the String message available via thegetMessage()
method.
-
Unsupported
public static final EncryptedPDFException.ErrorType Unsupported
Error type indicating that a PDF file is encrypted using a method that is unsupported by the current version of PDFxStream.
-
Syntax
public static final EncryptedPDFException.ErrorType Syntax
Error type indicating that a necessary decryption parameter either could not be found within the source PDF document, or has an invalid value.
-
-
Method Detail
-
values
public static EncryptedPDFException.ErrorType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EncryptedPDFException.ErrorType c : EncryptedPDFException.ErrorType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EncryptedPDFException.ErrorType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-