*/
private void updateRAR(String raProperties, boolean updateA3servers) throws Exception {
if (debug)
System.out.println("RAConfig.updateRAR(" + raProperties + ")");
FileReader file = new FileReader(raProperties);
LineNumberReader lnr = new LineNumberReader(file);
// get RAR name
String line = lnr.readLine();
while (line != null) {
if (line.startsWith("RAR_NAME"))
break;
line = lnr.readLine();
}
int i = line.indexOf("RAR_NAME");
String rarName = line.substring(i+"RAR_NAME".length()).trim();
if (debug)
System.out.println("RAConfig.updateRAR : rarName = " + rarName);
else if (verbose)
System.out.println("update rar \"" + rarName +
"\" with \"" + raProperties + "\"");
// create Map of properties
Map map = new Hashtable();
Hashtable prop = null;
String nodeName = null;
line = lnr.readLine();
while (line != null) {
if (line.startsWith("[")) {
prop = new Hashtable();
nodeName = line.substring(line.indexOf("[")+1,line.indexOf("]"));
map.put(nodeName.trim(),prop);
} else {
StringTokenizer st = new StringTokenizer(line);
if (st.countTokens() == 2 && prop != null) {
prop.put(st.nextToken(),st.nextToken());
}
}
line = lnr.readLine();
}
file.close();
if (debug)
System.out.println("RAConfig.updateRAR : map = " + map);
// create ra.xml file with new values