try {
String hostName = validHostNames[i];
System.out.println("hostName=" + hostName);
HostNameParser hnp = new HostNameParser(hostName);
HostPort hp = hnp.hostPort(true);
System.out.println("[" + hp.encode() + "]");
} catch (ParseException ex) {
fail(ex.getMessage());
}
}
}