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 2014/07/15 17:55:15 UTC
svn commit: r1610730 -
/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java
Author: tilman
Date: Tue Jul 15 15:55:15 2014
New Revision: 1610730
URL: http://svn.apache.org/r1610730
Log:
PDFBOX-2207: use written length, as suggested by Simon Steiner
Modified:
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java?rev=1610730&r1=1610729&r2=1610730&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java Tue Jul 15 15:55:15 2014
@@ -151,7 +151,7 @@ public class COSStream extends COSDictio
doEncode();
}
long position = filteredStream.getPosition();
- long length = filteredStream.getLength();
+ long length = filteredStream.getLengthWritten();
RandomAccessFileInputStream input =
new RandomAccessFileInputStream( file, position, length );
@@ -181,7 +181,7 @@ public class COSStream extends COSDictio
*
* @throws IOException when encoding/decoding causes an exception
*/
- public InputStream getUnfilteredStream() throws IOException
+ public InputStream getUnfilteredStream() throws IOException
{
InputStream retval;
if( unFilteredStream == null )
@@ -518,6 +518,7 @@ public class COSStream extends COSDictio
return new BufferedOutputStream( unFilteredStream, BUFFER_SIZE );
}
+ @Override
public void close()
{
try