private void tearDownAllConnections(){
  for (  NetworkInterface i : net) {
    List<Connection> conns=i.getConnections();
    if (conns.size() == 0)     continue;
    List<NetworkInterface> removeList=new ArrayList<NetworkInterface>(conns.size());
    for (    Connection con : conns) {
      removeList.add(con.getOtherInterface(i));
    }
    for (    NetworkInterface inf : removeList) {
      i.destroyConnection(inf);
    }
  }
}

private void tearDownAllConnections ( ) { for ( NetworkInterface i : net ) { List < Connection > conns = i . getConnections ( ) ; if ( conns . size ( ) == 0 ) continue ; List < NetworkInterface > removeList = new ArrayList < NetworkInterface > ( conns . size ( ) ) ; for ( Connection con : conns ) { removeList . add ( con . getOtherInterface ( i ) ) ; } for ( NetworkInterface inf : removeList ) { i . destroyConnection ( inf ) ; } } }
tears down all connections for this host .
