You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2016/10/15 14:00:22 UTC
svn commit: r1765069 -
/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
Author: tilman
Date: Sat Oct 15 14:00:22 2016
New Revision: 1765069
URL: http://svn.apache.org/viewvc?rev=1765069&view=rev
Log:
PDFBOX-2852: improve javadoc
Modified:
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java?rev=1765069&r1=1765068&r2=1765069&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java Sat Oct 15 14:00:22 2016
@@ -48,6 +48,7 @@ import org.apache.pdfbox.pdmodel.common.
import org.apache.pdfbox.pdmodel.common.PDRectangle;
import org.apache.pdfbox.pdmodel.common.PDStream;
import org.apache.pdfbox.pdmodel.encryption.AccessPermission;
+import org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException;
import org.apache.pdfbox.pdmodel.encryption.PDEncryption;
import org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy;
import org.apache.pdfbox.pdmodel.encryption.SecurityHandler;
@@ -852,9 +853,10 @@ public class PDDocument implements Close
*
* @return loaded document
*
+ * @throws InvalidPasswordException If the password is incorrect.
* @throws IOException in case of a file reading or parsing error
*/
- public static PDDocument load(File file) throws IOException
+ public static PDDocument load(File file) throws InvalidPasswordException, IOException
{
return load(file, "", MemoryUsageSetting.setupMainMemoryOnly());
}
@@ -867,9 +869,11 @@ public class PDDocument implements Close
*
* @return loaded document
*
+ * @throws InvalidPasswordException If the password is incorrect.
* @throws IOException in case of a file reading or parsing error
*/
- public static PDDocument load(File file, MemoryUsageSetting memUsageSetting) throws IOException
+ public static PDDocument load(File file, MemoryUsageSetting memUsageSetting)
+ throws InvalidPasswordException, IOException
{
return load(file, "", null, null, memUsageSetting);
}
@@ -882,9 +886,11 @@ public class PDDocument implements Close
*
* @return loaded document
*
+ * @throws InvalidPasswordException If the password is incorrect.
* @throws IOException in case of a file reading or parsing error
*/
- public static PDDocument load(File file, String password) throws IOException
+ public static PDDocument load(File file, String password)
+ throws InvalidPasswordException, IOException
{
return load(file, password, null, null, MemoryUsageSetting.setupMainMemoryOnly());
}
@@ -898,9 +904,11 @@ public class PDDocument implements Close
*
* @return loaded document
*
+ * @throws InvalidPasswordException If the password is incorrect.
* @throws IOException in case of a file reading or parsing error
*/
- public static PDDocument load(File file, String password, MemoryUsageSetting memUsageSetting) throws IOException
+ public static PDDocument load(File file, String password, MemoryUsageSetting memUsageSetting)
+ throws InvalidPasswordException, IOException
{
return load(file, password, null, null, memUsageSetting);
}
@@ -970,9 +978,10 @@ public class PDDocument implements Close
*
* @return loaded document
*
+ * @throws InvalidPasswordException If the password is incorrect.
* @throws IOException in case of a file reading or parsing error
*/
- public static PDDocument load(InputStream input) throws IOException
+ public static PDDocument load(InputStream input) throws InvalidPasswordException, IOException
{
return load(input, "", null, null, MemoryUsageSetting.setupMainMemoryOnly());
}
@@ -987,9 +996,11 @@ public class PDDocument implements Close
*
* @return loaded document
*
+ * @throws InvalidPasswordException If the password is incorrect.
* @throws IOException in case of a file reading or parsing error
*/
- public static PDDocument load(InputStream input, MemoryUsageSetting memUsageSetting) throws IOException
+ public static PDDocument load(InputStream input, MemoryUsageSetting memUsageSetting)
+ throws InvalidPasswordException, IOException
{
return load(input, "", null, null, memUsageSetting);
}
@@ -1003,10 +1014,11 @@ public class PDDocument implements Close
*
* @return loaded document
*
+ * @throws InvalidPasswordException If the password is incorrect.
* @throws IOException in case of a file reading or parsing error
*/
public static PDDocument load(InputStream input, String password)
- throws IOException
+ throws InvalidPasswordException, IOException
{
return load(input, password, null, null, MemoryUsageSetting.setupMainMemoryOnly());
}
@@ -1041,10 +1053,11 @@ public class PDDocument implements Close
*
* @return loaded document
*
+ * @throws InvalidPasswordException If the password is incorrect.
* @throws IOException in case of a file reading or parsing error
*/
public static PDDocument load(InputStream input, String password, MemoryUsageSetting memUsageSetting)
- throws IOException
+ throws InvalidPasswordException, IOException
{
return load(input, password, null, null, memUsageSetting);
}
@@ -1089,9 +1102,10 @@ public class PDDocument implements Close
*
* @return loaded document
*
+ * @throws InvalidPasswordException If the password is incorrect.
* @throws IOException in case of a file reading or parsing error
*/
- public static PDDocument load(byte[] input) throws IOException
+ public static PDDocument load(byte[] input) throws InvalidPasswordException, IOException
{
return load(input, "");
}
@@ -1104,9 +1118,11 @@ public class PDDocument implements Close
*
* @return loaded document
*
+ * @throws InvalidPasswordException If the password is incorrect.
* @throws IOException in case of a file reading or parsing error
*/
- public static PDDocument load(byte[] input, String password) throws IOException
+ public static PDDocument load(byte[] input, String password)
+ throws InvalidPasswordException, IOException
{
return load(input, password, null, null);
}