pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1652173 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
Date Thu, 15 Jan 2015 17:11:01 GMT
Author: lehmi
Date: Thu Jan 15 17:11:01 2015
New Revision: 1652173

URL: http://svn.apache.org/r1652173
Log:
PDFBOX-2600: removed loadLegacy methods

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java?rev=1652173&r1=1652172&r2=1652173&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java Thu Jan 15
17:11:01 2015
@@ -18,7 +18,6 @@ package org.apache.pdfbox.pdmodel;
 
 import java.io.Closeable;
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -38,7 +37,6 @@ import org.apache.pdfbox.cos.COSStream;
 import org.apache.pdfbox.io.RandomAccessBufferedFileInputStream;
 import org.apache.pdfbox.pdfparser.BaseParser;
 import org.apache.pdfbox.pdfparser.NonSequentialPDFParser;
-import org.apache.pdfbox.pdfparser.PDFParser;
 import org.apache.pdfbox.pdfwriter.COSWriter;
 import org.apache.pdfbox.pdmodel.common.COSArrayList;
 import org.apache.pdfbox.pdmodel.common.PDRectangle;
@@ -781,69 +779,6 @@ public class PDDocument implements Close
     }
 
     /**
-     * This will load a document from a file.
-     * 
-     * @param file The name of the file to load.
-     * 
-     * @return The document that was loaded.
-     * 
-     * @throws IOException If there is an error reading from the stream.
-     */
-    public static PDDocument loadLegacy(File file) throws IOException
-    {
-        return loadLegacy(file, false);
-    }
-
-    /**
-     * This will load a document from a file. Allows for skipping corrupt pdf objects
-     *
-     * @param file The name of the file to load.
-     * @param useScratchFiles enables the usage of a scratch file if set to true
-     *
-     * @return The document that was loaded.
-     *
-     * @throws IOException If there is an error reading from the stream.
-     */
-    public static PDDocument loadLegacy(File file, boolean useScratchFiles) throws IOException
-    {
-        PDFParser parser = new PDFParser(new FileInputStream(file), useScratchFiles);
-        parser.parse();
-        PDDocument doc = parser.getPDDocument();
-        doc.incrementalFile = file;
-        return doc;
-    }
-
-    /**
-     * This will load a document from an input stream.
-     * 
-     * @param input The stream that contains the document.
-     * 
-     * @return The document that was loaded.
-     * 
-     * @throws IOException If there is an error reading from the stream.
-     */
-    public static PDDocument loadLegacy(InputStream input) throws IOException
-    {
-        return loadLegacy(input, false);
-    }
-
-    /**
-     * This will load a document from an input stream. Allows for skipping corrupt pdf objects
-     * 
-     * @param input The stream that contains the document.
-     * @param useScratchFiles enables the usage of a scratch file if set to true
-     * 
-     * @return The document that was loaded.
-     * 
-     * @throws IOException If there is an error reading from the stream.
-     */
-    public static PDDocument loadLegacy(InputStream input, boolean useScratchFiles) throws
IOException
-    {
-        PDFParser parser = new PDFParser(input, useScratchFiles);
-        parser.parse();
-        return parser.getPDDocument();
-    }
-    /**
      * Parses PDF with non sequential parser.
      * 
      * @param file file to be loaded



Mime
View raw message