int index = object.getReference().getObjectNumber();
// Get the old indirect object to be replaced!
PdfIndirectObject old = get(index);
if(old != object)
{old.dropFile();} // Disconnects the old indirect object.
// Insert the new indirect object into the modified objects collection!
modifiedObjects.put(index,object);
// Remove old indirect object from cache!
wokenObjects.remove(index);