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/12/19 11:12:07 UTC
svn commit: r1646661 -
/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java
Author: tilman
Date: Fri Dec 19 10:12:07 2014
New Revision: 1646661
URL: http://svn.apache.org/r1646661
Log:
PDFBOX-2576: don't generate ByteArrayOutputStream when hex string
Modified:
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java?rev=1646661&r1=1646660&r2=1646661&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java Fri Dec 19 10:12:07 2014
@@ -762,7 +762,6 @@ public abstract class BaseParser
protected COSString parseCOSString() throws IOException
{
char nextChar = (char)pdfSource.read();
- ByteArrayOutputStream out = new ByteArrayOutputStream();
char openBrace;
char closeBrace;
if( nextChar == '(' )
@@ -779,6 +778,8 @@ public abstract class BaseParser
throw new IOException( "parseCOSString string should start with '(' or '<' and not '" +
nextChar + "' " + pdfSource );
}
+
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
//This is the number of braces read
//