code: 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);
              }
          }
      }
docs: Helper method for performing resolve as String
  @param uriInitial
  @param uriString
  @return