You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by le...@apache.org on 2015/02/16 17:34:38 UTC

svn commit: r1660159 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox: cos/COSStream.java pdmodel/common/COSStreamArray.java

Author: lehmi
Date: Mon Feb 16 16:34:38 2015
New Revision: 1660159

URL: http://svn.apache.org/r1660159
Log:
PDFBOX-2301: remove unused getStreamTokens

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/COSStreamArray.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=1660159&r1=1660158&r2=1660159&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 Mon Feb 16 16:34:38 2015
@@ -24,7 +24,6 @@ import java.io.File;
 import java.io.InputStream;
 import java.io.IOException;
 import java.io.OutputStream;
-import java.util.List;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -37,7 +36,6 @@ import org.apache.pdfbox.io.RandomAccess
 import org.apache.pdfbox.io.RandomAccessFile;
 import org.apache.pdfbox.io.RandomAccessFileInputStream;
 import org.apache.pdfbox.io.RandomAccessFileOutputStream;
-import org.apache.pdfbox.pdfparser.PDFStreamParser;
 
 /**
  * This class represents a stream object in a PDF document.
@@ -152,20 +150,6 @@ public class COSStream extends COSDictio
     }
 
     /**
-     * This will get all the tokens in the stream.
-     *
-     * @return All of the tokens in the stream.
-     *
-     * @throws IOException If there is an error parsing the stream.
-     */
-    public List<Object> getStreamTokens() throws IOException
-    {
-        PDFStreamParser parser = new PDFStreamParser( this );
-        parser.parse();
-        return parser.getTokens();
-    }
-
-    /**
      * This will get the stream with all of the filters applied.
      *
      * @return the bytes of the physical (encoded) stream

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/COSStreamArray.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/COSStreamArray.java?rev=1660159&r1=1660158&r2=1660159&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/COSStreamArray.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/COSStreamArray.java Mon Feb 16 16:34:38 2015
@@ -22,8 +22,6 @@ import java.io.IOException;
 import java.io.OutputStream;
 import java.io.SequenceInputStream;
 
-import java.util.ArrayList;
-import java.util.List;
 import java.util.Vector;
 
 import org.apache.pdfbox.cos.COSArray;
@@ -33,13 +31,10 @@ import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.cos.COSStream;
 import org.apache.pdfbox.cos.ICOSVisitor;
 
-import org.apache.pdfbox.pdfparser.PDFStreamParser;
-
 /**
  * This will take an array of streams and sequence them together.
  *
- * @author <a href="mailto:ben@benlitchfield.com">Ben Litchfield</a>
- * @version $Revision: 1.10 $
+ * @author Ben Litchfield
  */
 public class COSStreamArray extends COSStream
 {
@@ -124,30 +119,6 @@ public class COSStreamArray extends COSS
     }
 
     /**
-     * This will get all the tokens in the stream.
-     *
-     * @return All of the tokens in the stream.
-     *
-     * @throws IOException If there is an error parsing the stream.
-     */
-    @Override
-    public List<Object> getStreamTokens() throws IOException
-    {
-        List<Object> retval;
-        if( streams.size() > 0 )
-        {
-            PDFStreamParser parser = new PDFStreamParser( this );
-            parser.parse();
-            retval = parser.getTokens();
-        }
-        else
-        {
-            retval = new ArrayList<Object>();
-        }
-        return retval;
-    }
-
-    /**
      * This will get the dictionary that is associated with this stream.
      *
      * @return the object that is associated with this stream.