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/05/30 15:25:55 UTC

svn commit: r1860408 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature.java

Author: tilman
Date: Thu May 30 15:25:55 2019
New Revision: 1860408

URL: http://svn.apache.org/viewvc?rev=1860408&view=rev
Log:
PDFBOX-4071: use base class

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature.java?rev=1860408&r1=1860407&r2=1860408&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature.java Thu May 30 15:25:55 2019
@@ -335,12 +335,12 @@ public class PDSignature implements COSO
         return getConvertedContents(new COSFilterInputStream(pdfFile,new int[] {begin,len}));
     }
 
-    private byte[] getConvertedContents(COSFilterInputStream fis) throws IOException
+    private byte[] getConvertedContents(InputStream is) throws IOException
     {
         ByteArrayOutputStream byteOS = new ByteArrayOutputStream(1024);
         byte[] buffer = new byte[1024];
         int c;
-        while ((c = fis.read(buffer)) != -1)
+        while ((c = is.read(buffer)) != -1)
         {
             // Filter < and (
             if(buffer[0]==0x3C || buffer[0]==0x28)
@@ -357,7 +357,7 @@ public class PDSignature implements COSO
                 byteOS.write(buffer, 0, c);
             }
         }
-        fis.close();
+        is.close();
 
         return COSString.parseHex(byteOS.toString("ISO-8859-1")).getBytes();
     }