protected static void establishMirror(){
  if (m_offline) {
    return;
  }
  try {
    String mirrorListURL="http://www.cs.waikato.ac.nz/ml/weka/packageMetaDataMirror.txt";
    URLConnection conn=null;
    URL connURL=new URL(mirrorListURL);
    if (PACKAGE_MANAGER.setProxyAuthentication(connURL)) {
      conn=connURL.openConnection(PACKAGE_MANAGER.getProxy());
    }
 else {
      conn=connURL.openConnection();
    }
    conn.setConnectTimeout(10000);
    conn.setReadTimeout(10000);
    BufferedReader bi=new BufferedReader(new InputStreamReader(conn.getInputStream()));
    REP_MIRROR=bi.readLine();
    bi.close();
    if (REP_MIRROR != null && REP_MIRROR.length() > 0) {
      if (!REP_MIRROR.equals(PRIMARY_REPOSITORY) && !USER_SET_REPO) {
        log(weka.core.logging.Logger.Level.INFO,"[WekaPackageManager] Package manager using repository mirror: " + REP_MIRROR);
        REP_URL=new URL(REP_MIRROR);
      }
    }
  }
 catch (  Exception ex) {
    log(weka.core.logging.Logger.Level.WARNING,"[WekaPackageManager] The repository meta data mirror file seems " + "to be unavailable (" + ex.getMessage() + ")");
  }
}

protected static void establishMirror ( ) { if ( m_offline ) { return ; } try { String mirrorListURL = "http://www.cs.waikato.ac.nz/ml/weka/packageMetaDataMirror.txt" ; URLConnection conn = null ; URL connURL = new URL ( mirrorListURL ) ; if ( PACKAGE_MANAGER . setProxyAuthentication ( connURL ) ) { conn = connURL . openConnection ( PACKAGE_MANAGER . getProxy ( ) ) ; } else { conn = connURL . openConnection ( ) ; } conn . setConnectTimeout ( 10000 ) ; conn . setReadTimeout ( 10000 ) ; BufferedReader bi = new BufferedReader ( new InputStreamReader ( conn . getInputStream ( ) ) ) ; REP_MIRROR = bi . readLine ( ) ; bi . close ( ) ; if ( REP_MIRROR != null && REP_MIRROR . length ( ) > 0 ) { if ( ! REP_MIRROR . equals ( PRIMARY_REPOSITORY ) && ! USER_SET_REPO ) { log ( weka . core . logging . Logger . Level . INFO , "[WekaPackageManager] Package manager using repository mirror: " + REP_MIRROR ) ; REP_URL = new URL ( REP_MIRROR ) ; } } } catch ( Exception ex ) { log ( weka . core . logging . Logger . Level . WARNING , "[WekaPackageManager] The repository meta data mirror file seems " + "to be unavailable (" + ex . getMessage ( ) + ")" ) ; } }
establish the location of a mirror
