String line) {
try {
//Only accept numeric addresses. (An earlier version of this
//did not do strict checking, possibly resulting in HTML in the
//gnutella.net file!)
ServerInfo si = null;
final int DEFAULT = 443;
int j = line.indexOf(":");
if (j < 0) {
si = new ServerInfo("",line, new Integer(DEFAULT),"");
}
else if (j == 0) {
throw new IllegalArgumentException();
}
else if (j == (line.length() - 1)) {
si = new ServerInfo("",line.substring(0, j), new Integer(DEFAULT),"");
}
else {
String hostname = line.substring(0, j);
int port = DEFAULT;
try {
port = Integer.parseInt(line.substring(j + 1));
}
catch (NumberFormatException e) {
throw new IllegalArgumentException();
}
if (port < 0 || port > 65535) {
throw new IllegalArgumentException("invalid port");
}
si = new ServerInfo("",hostname, new Integer(port),"");
}
ArrayList al = new ArrayList();
al.add(si);
BootstrapServerManager.instance().propertyChangeSupport.firePropertyChange("inetAddressQueryCompleted", null, al);
responses++;