pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1821021 - /pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature2.java
Date Fri, 12 Jan 2018 19:13:35 GMT
Author: tilman
Date: Fri Jan 12 19:13:35 2018
New Revision: 1821021

URL: http://svn.apache.org/viewvc?rev=1821021&view=rev
Log:
PDFBOX-3198: move constructor to beginning

Modified:
    pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature2.java

Modified: pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature2.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature2.java?rev=1821021&r1=1821020&r2=1821021&view=diff
==============================================================================
--- pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature2.java
(original)
+++ pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature2.java
Fri Jan 12 19:13:35 2018
@@ -79,6 +79,24 @@ public class CreateVisibleSignature2 ext
     private boolean lateExternalSigning = false;
     private File imageFile;
 
+    /**
+     * Initialize the signature creator with a keystore (pkcs12) and pin that
+     * should be used for the signature.
+     *
+     * @param keystore is a pkcs12 keystore.
+     * @param pin is the pin for the keystore / private key
+     * @throws KeyStoreException if the keystore has not been initialized (loaded)
+     * @throws NoSuchAlgorithmException if the algorithm for recovering the key cannot be
found
+     * @throws UnrecoverableKeyException if the given password is wrong
+     * @throws CertificateException if the certificate is not valid as signing time
+     * @throws IOException if no certificate could be found
+     */
+    public CreateVisibleSignature2(KeyStore keystore, char[] pin)
+            throws KeyStoreException, UnrecoverableKeyException, NoSuchAlgorithmException,
IOException, CertificateException
+    {
+        super(keystore, pin);
+    }
+
     public File getImageFile()
     {
         return imageFile;
@@ -107,24 +125,6 @@ public class CreateVisibleSignature2 ext
     }
 
     /**
-     * Initialize the signature creator with a keystore (pkcs12) and pin that
-     * should be used for the signature.
-     *
-     * @param keystore is a pkcs12 keystore.
-     * @param pin is the pin for the keystore / private key
-     * @throws KeyStoreException if the keystore has not been initialized (loaded)
-     * @throws NoSuchAlgorithmException if the algorithm for recovering the key cannot be
found
-     * @throws UnrecoverableKeyException if the given password is wrong
-     * @throws CertificateException if the certificate is not valid as signing time
-     * @throws IOException if no certificate could be found
-     */
-    public CreateVisibleSignature2(KeyStore keystore, char[] pin)
-            throws KeyStoreException, UnrecoverableKeyException, NoSuchAlgorithmException,
IOException, CertificateException
-    {
-        super(keystore, pin);
-    }
-
-    /**
      * Sign pdf file and create new file that ends with "_signed.pdf".
      *
      * @param inputFile The source pdf document file.



Mime
View raw message