String key = (String) iter.next();
String parts[] = key.split("\\.");
String url = CrawlerToolkit.createURLFromProps(parts);
// Check for url in HashMap
AccountPasswordEntry acPassEntry;
if (accountPasswordStore.containsKey(url)) {
acPassEntry = accountPasswordStore.get(url);
} else {
acPassEntry = new AccountPasswordEntry();
}
if (key.indexOf(".account") != -1) {
acPassEntry.setAccountName(URLEncoder.encode(authProps.getProperty(key), "UTF-8"));
mLog.debug("Found account name: " + acPassEntry.getAccountName() + " for auth entry: " + url);
} else if (key.indexOf(".password") != -1) {
Base64 decoder = new Base64();
acPassEntry.setPassword(new String(decoder.decode(authProps.getProperty(key))));
mLog.debug("Found password for auth entry: " + url);
}
// write the updated entry back to hashtable
mLog.debug("write entry for url >" + url + "<" + " with username/password into authentication store.");
accountPasswordStore.put(url, acPassEntry);