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 2019/06/23 11:01:49 UTC
svn commit: r1861911 -
/pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
Author: tilman
Date: Sun Jun 23 11:01:49 2019
New Revision: 1861911
URL: http://svn.apache.org/viewvc?rev=1861911&view=rev
Log:
PDFBOX-4071: SonarQube fix, move constructors up
Modified:
pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
Modified: pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java?rev=1861911&r1=1861910&r2=1861911&view=diff
==============================================================================
--- pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java (original)
+++ pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java Sun Jun 23 11:01:49 2019
@@ -219,6 +219,42 @@ public class PDDocument implements Close
}
/**
+ * Constructor that uses an existing document. The COSDocument that is passed in must be valid.
+ *
+ * @param doc The COSDocument that this document wraps.
+ */
+ public PDDocument(COSDocument doc)
+ {
+ this(doc, null);
+ }
+
+ /**
+ * Constructor that uses an existing document. The COSDocument that is passed in must be valid.
+ *
+ * @param doc The COSDocument that this document wraps.
+ * @param source the parser which is used to read the pdf
+ */
+ public PDDocument(COSDocument doc, RandomAccessRead source)
+ {
+ this(doc, source, null);
+ }
+
+ /**
+ * Constructor that uses an existing document. The COSDocument that is passed in must be valid.
+ *
+ * @param doc The COSDocument that this document wraps.
+ * @param source the parser which is used to read the pdf
+ * @param permission he access permissions of the pdf
+ *
+ */
+ public PDDocument(COSDocument doc, RandomAccessRead source, AccessPermission permission)
+ {
+ document = doc;
+ pdfSource = source;
+ accessPermission = permission;
+ }
+
+ /**
* This will add a page to the document. This is a convenience method, that will add the page to the root of the
* hierarchy and set the parent of the page to the root.
*
@@ -738,42 +774,6 @@ public class PDDocument implements Close
}
/**
- * Constructor that uses an existing document. The COSDocument that is passed in must be valid.
- *
- * @param doc The COSDocument that this document wraps.
- */
- public PDDocument(COSDocument doc)
- {
- this(doc, null);
- }
-
- /**
- * Constructor that uses an existing document. The COSDocument that is passed in must be valid.
- *
- * @param doc The COSDocument that this document wraps.
- * @param source the parser which is used to read the pdf
- */
- public PDDocument(COSDocument doc, RandomAccessRead source)
- {
- this(doc, source, null);
- }
-
- /**
- * Constructor that uses an existing document. The COSDocument that is passed in must be valid.
- *
- * @param doc The COSDocument that this document wraps.
- * @param source the parser which is used to read the pdf
- * @param permission he access permissions of the pdf
- *
- */
- public PDDocument(COSDocument doc, RandomAccessRead source, AccessPermission permission)
- {
- document = doc;
- pdfSource = source;
- accessPermission = permission;
- }
-
- /**
* This will get the low level document.
*
* @return The document that this layer sits on top of.