public static String resolve ( String uriInitial , String uriString ) { try { return uriToString ( ( new URI ( uriInitial ) ) . resolve ( uriString ) ) ; } catch ( URISyntaxException e ) { try { return ( new NetworkInterfaceURI ( uriInitial ) ) . resolve ( uriString ) ; } catch ( IllegalArgumentException ne ) { throw new IllegalArgumentException ( ne . getMessage ( ) , ne ) ; } } }
Helper method for performing resolve as String