public void readMap(File file,MapBuilder builder){
  try {
    MapBuilderProxy proxy;
    if (boundingBox != null)     proxy=new BBBuilderProxy(builder,boundingBox);
 else     if (attFilter != null)     proxy=new FilteringBuilderProxy(builder,attFilter);
 else     proxy=new MapBuilderProxy(builder);
    parseMap(createFileStream(file),proxy);
    if (proxy.nodeRefsWithoutDefsAdded()) {
      if (boundingBox != null || attFilter != null) {
        LOG.info("Starting to parse the map file a second time.");
        proxy.incrementCounter();
        parseMap(createFileStream(file),proxy);
      }
 else {
        LOG.warning("Nodes were referenced in ways but not defined before.");
      }
    }
  }
 catch (  FileNotFoundException e) {
    LOG.warning("File does not exist " + file);
  }
catch (  Exception e) {
    LOG.warning("The map could not be read. " + e);
    e.printStackTrace();
  }
 finally {
    boundingBox=null;
    attFilter=null;
  }
}

public void readMap ( File file , MapBuilder builder ) { try { MapBuilderProxy proxy ; if ( boundingBox != null ) proxy = new BBBuilderProxy ( builder , boundingBox ) ; else if ( attFilter != null ) proxy = new FilteringBuilderProxy ( builder , attFilter ) ; else proxy = new MapBuilderProxy ( builder ) ; parseMap ( createFileStream ( file ) , proxy ) ; if ( proxy . nodeRefsWithoutDefsAdded ( ) ) { if ( boundingBox != null || attFilter != null ) { LOG . info ( "Starting to parse the map file a second time." ) ; proxy . incrementCounter ( ) ; parseMap ( createFileStream ( file ) , proxy ) ; } else { LOG . warning ( "Nodes were referenced in ways but not defined before." ) ; } } } catch ( FileNotFoundException e ) { LOG . warning ( "File does not exist " + file ) ; } catch ( Exception e ) { LOG . warning ( "The map could not be read. " + e ) ; e . printStackTrace ( ) ; } finally { boundingBox = null ; attFilter = null ; } }
reads all data from the file and send it to the sink .
