--- pdfbox/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java	2011-05-02 09:50:48.220622194 +0200
+++ pdfbox_diff/src/org/apache/pdfbox/cos/COSDocument.java	2011-05-19 15:21:49.425669044 +0200
@@ -30,7 +30,6 @@
 import org.apache.pdfbox.io.RandomAccessBuffer;
 import org.apache.pdfbox.io.RandomAccessFile;
 import org.apache.pdfbox.pdfparser.PDFObjectStreamParser;
-import org.apache.pdfbox.pdfparser.PDFXrefStreamParser;
 import org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface;
 import org.apache.pdfbox.persistence.util.COSObjectKey;
 
@@ -585,14 +584,13 @@
     }
 
     /**
-     * Used to populate the XRef HashMap. Will add an Xreftable entry
-     * that maps ObjectKeys to byte offsets in the file.
-     * @param objKey The objkey, with id and gen numbers
-     * @param offset The byte offset in this file
+     * Populate XRef HashMap with given values.
+     * Each entry maps ObjectKeys to byte offsets in the file.
+     * @param _xrefTable  xref table entries to be added
      */
-    public void setXRef(COSObjectKey objKey, int offset)
+    public void addXRefTable( Map<COSObjectKey, Integer> _xrefTable )
     {
-        xrefTable.put(objKey, offset);
+        xrefTable.putAll( _xrefTable );
     }
 
     /**
@@ -606,27 +604,6 @@
     }
 
     /**
-     * This method will search the list of objects for types of XRef and
-     * uses the parsed data to populate the trailer information as well as
-     * the xref Map.
-     *
-     * @throws IOException if there is an error parsing the stream
-     */
-    public void parseXrefStreams() throws IOException
-    {
-        COSDictionary trailerDict = new COSDictionary();
-        for( COSObject xrefStream : getObjectsByType( "XRef" ) )
-        {
-            COSStream stream = (COSStream)xrefStream.getObject();
-            trailerDict.addAll(stream);
-            PDFXrefStreamParser parser =
-                new PDFXrefStreamParser(stream, this, forceParsing);
-            parser.parse();
-        }
-        setTrailer( trailerDict );
-    }
-    
-    /**
      * This method set the startxref value of the document. This will only 
      * be needed for incremental updates.
      * 
