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 2018/09/20 06:52:49 UTC

svn commit: r1841432 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java

Author: tilman
Date: Thu Sep 20 06:52:49 2018
New Revision: 1841432

URL: http://svn.apache.org/viewvc?rev=1841432&view=rev
Log:
PDFBOX-4312: add scaring comment

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

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java?rev=1841432&r1=1841431&r2=1841432&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java (original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java Thu Sep 20 06:52:49 2018
@@ -1388,6 +1388,9 @@ public class PDDocument implements Pagea
      */
     public void saveIncremental(String fileName) throws IOException, COSVisitorException
     {
+        //BEWARE: do not "optimize" this method by using buffered streams,
+        // because COSStandardOutputStream only allows seeking
+        // if a FileOutputStream is passed, see PDFBOX-4312.
         FileInputStream fis = new FileInputStream(fileName);
         byte[] ba = IOUtils.toByteArray(fis);
         fis.close();