//Parse the url into attributes and put them in a Properties object.
StringTokenizer st = new StringTokenizer(url.substring(protocol.length()), ";:\"");
attributes = new Vector();
while (st.hasMoreTokens()) {
AttributeHolder anAttribute = new AttributeHolder();
String anAtt = "";
String aValue = "";
String aToken = st.nextToken();
//The "=" is the seperator between key and value.
int eqPos = aToken.indexOf('=');
if (eqPos == -1) {
//If there is no "=" this is not an attribute
continue;
}
else {
anAtt = (aToken.substring(0, eqPos)).trim();
aValue = (aToken.substring(eqPos + 1)).trim();
}
anAttribute.setName(anAtt);
anAttribute.setValue(aValue);
anAttribute.setToken(aToken);
attributes.addElement(anAttribute);
props.put(anAtt, aToken);
}
return props;
}