private static String massageURI(String uri){
  uri=uri.trim();
  int protocolEnd=uri.indexOf(':');
  if (protocolEnd < 0 || isColonFollowedByPortNumber(uri,protocolEnd)) {
    uri="http://" + uri;
  }
  return uri;
}

private static String massageURI ( String uri ) { uri = uri . trim ( ) ; int protocolEnd = uri . indexOf ( ':' ) ; if ( protocolEnd < 0 || isColonFollowedByPortNumber ( uri , protocolEnd ) ) { uri = "http://" + uri ; } return uri ; }
transforms a string that represents a uri into something more proper , by adding or canonicalizing the protocol .
