Perform the connection address field parsing
ConnectionAddress connectionAddress = new ConnectionAddress();
int begin = address.indexOf("/");
if (begin != -1) {
connectionAddress.setAddress(new Host(address.substring(0, begin)));
int middle = address.indexOf("/", begin+1);
if (middle != -1) {
String ttl = address.substring(begin+1, middle);
connectionAddress.setTtl(Integer.parseInt(ttl.trim()));
String addressNumber = address.substring(middle+1);
connectionAddress
.setPort(Integer.parseInt(addressNumber.trim()));
} else {
String ttl = address.substring(begin+1);
connectionAddress.setTtl(Integer.parseInt(ttl.trim()));
}
} else
connectionAddress.setAddress(new Host(address));
return connectionAddress;