pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1656107 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFParser.java
Date Fri, 30 Jan 2015 20:13:02 GMT
Author: tilman
Date: Fri Jan 30 20:13:02 2015
New Revision: 1656107

URL: http://svn.apache.org/r1656107
Log:
PDFBOX-2576: pull up duplicate method

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFParser.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFParser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFParser.java?rev=1656107&r1=1656106&r2=1656107&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFParser.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFParser.java Fri Jan 30
20:13:02 2015
@@ -18,7 +18,6 @@ package org.apache.pdfbox.pdfparser;
 
 import java.io.ByteArrayInputStream;
 import java.io.File;
-import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.security.KeyStore;
@@ -286,31 +285,6 @@ public class PDFParser extends COSParser
     }
 
     /**
-     * Create a temporary file with the input stream. If the creation succeed, the {@linkplain
#isTmpPDFFile} is set to
-     * true. This Temporary file will be deleted at end of the parse method
-     * 
-     * @param input
-     * @return the temporary file
-     * @throws IOException If something went wrong.
-     */
-    private File createTmpFile(InputStream input) throws IOException
-    {
-        FileOutputStream fos = null;
-        try
-        {
-            File tmpFile = File.createTempFile(TMP_FILE_PREFIX, ".pdf");
-            fos = new FileOutputStream(tmpFile);
-            IOUtils.copy(input, fos);
-            return tmpFile;
-        }
-        finally
-        {
-            IOUtils.closeQuietly(input);
-            IOUtils.closeQuietly(fos);
-        }
-    }
-
-    /**
      * This will get the PD document that was parsed.  When you are done with
      * this document you must call close() on it to release resources.
      *



Mime
View raw message