private String updateHostNameInURL(String url,String siteFQDN) throws MalformedURLException {
  Validate.notEmpty(url,"Null URL string.");
  URL oldUrl=new URL(url);
  URL newUrl=new URL(oldUrl.getProtocol(),siteFQDN,oldUrl.getPort(),oldUrl.getFile());
  return newUrl.toExternalForm();
}

private String updateHostNameInURL ( String url , String siteFQDN ) throws MalformedURLException { Validate . notEmpty ( url , "Null URL string." ) ; URL oldUrl = new URL ( url ) ; URL newUrl = new URL ( oldUrl . getProtocol ( ) , siteFQDN , oldUrl . getPort ( ) , oldUrl . getFile ( ) ) ; return newUrl . toExternalForm ( ) ; }
update the hostname portion of a url
