public void addPage(final Page page) throws IOException, SAXException {
      if (currentSiteMapFile.getEntryCount() == 25000) {
        siteMaps.add(currentSiteMapFile);
        count += currentSiteMapFile.getEntryCount();
        currentSiteMapFile.finish();

        currentSiteMapFile = new SiteMapFile(siteMaps.size() + 1);
      }

      currentSiteMapFile.addPage(page);
    }
 public void finish() throws IOException {
   siteMaps.add(currentSiteMapFile);
   count += currentSiteMapFile.getEntryCount();
   currentSiteMapFile.finish();
 }