pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1656100 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDocument.java
Date Fri, 30 Jan 2015 19:30:37 GMT
Author: tilman
Date: Fri Jan 30 19:30:37 2015
New Revision: 1656100

URL: http://svn.apache.org/r1656100
Log:
PDFBOX-2644: don't use temp file for FDF file parse

Modified:
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDocument.java

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDocument.java?rev=1656100&r1=1656099&r2=1656100&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDocument.java
(original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDocument.java
Fri Jan 30 19:30:37 2015
@@ -169,7 +169,7 @@ public class FDFDocument implements Clos
      */
     public static FDFDocument load( String filename ) throws IOException
     {
-        return load( new BufferedInputStream( new FileInputStream( filename ) ) );
+        return load(new File(filename));
     }
 
     /**
@@ -183,7 +183,9 @@ public class FDFDocument implements Clos
      */
     public static FDFDocument load( File file ) throws IOException
     {
-        return load( new BufferedInputStream( new FileInputStream( file ) ) );
+        NonSequentialPDFParser parser = new NonSequentialPDFParser(file, null);
+        parser.parse();
+        return parser.getFDFDocument();
     }
 
     /**



Mime
View raw message