Java Reference
In-Depth Information
L ISTING 6.4 Continued
6
* writes some related property values
*/
private void write(String client,
String policy,
String installedVersion,
String replaceItems,
String launchClass) {
if (client==null)
return;
if (policy!=null)
downloadPolicy.put(client+”-policy”,policy);
if (installedVersion!=null)
downloadPolicy.put(client+”-installed”,installedVersion);
if (replaceItems!=null)
downloadPolicy.getProperty(client+”-replace-items”, replaceItems);
if (launchClass!=null)
downloadPolicy.getProperty(client+”-launch”, launchClass);
}
/**
* It reads some related property values
*/
private String[] read(String client){
if (client==null)
return null;
String[] ret = new String[4];
String policy =
downloadPolicy.getProperty(client+”-policy”,DEFAULT_POLICY);
String installedVersion =
downloadPolicy.getProperty(client+”-installed”, “1.0”);
String replaceItems =
downloadPolicy.getProperty(client+”-replace-items”, “”);
String launchClass =
downloadPolicy.getProperty(client+”-launch”, “BankClient”);
ret[0] = policy;
ret[1] = installedVersion;
ret[2] = replaceItems;
ret[3] = launchClass;
return ret;
}
/**
Search WWH ::




Custom Search