private static Iterator parse(Class service,URL u,Set returned) throws ServiceConfigurationError {
  InputStream in=null;
  BufferedReader r=null;
  ArrayList names=new ArrayList();
  try {
    in=u.openStream();
    r=new BufferedReader(new InputStreamReader(in,"utf-8"));
    int lc=1;
    while ((lc=parseLine(service,u,r,lc,names,returned)) >= 0)     ;
  }
 catch (  IOException x) {
    fail(service,": " + x);
  }
 finally {
    try {
      if (r != null)       r.close();
      if (in != null)       in.close();
    }
 catch (    IOException y) {
      fail(service,": " + y);
    }
  }
  return names.iterator();
}

private static Iterator parse ( Class service , URL u , Set returned ) throws ServiceConfigurationError { InputStream in = null ; BufferedReader r = null ; ArrayList names = new ArrayList ( ) ; try { in = u . openStream ( ) ; r = new BufferedReader ( new InputStreamReader ( in , "utf-8" ) ) ; int lc = 1 ; while ( ( lc = parseLine ( service , u , r , lc , names , returned ) ) >= 0 ) ; } catch ( IOException x ) { fail ( service , ": " + x ) ; } finally { try { if ( r != null ) r . close ( ) ; if ( in != null ) in . close ( ) ; } catch ( IOException y ) { fail ( service , ": " + y ) ; } } return names . iterator ( ) ; }
parse the content of the given url as a provider - configuration file .
