private static URL toUrl(String url) throws IOException {
    try {
      return new URI(url).toURL();
    } catch (MalformedURLException | URISyntaxException e) {
      throw new IOException(String.format("invalid URL: \"%s\"", url), e);
    }
  }
Easily construct a {@link java.net.URL} while mapping to the exceptions DTP needs.
portability-spi-api/src/main/java/org/datatransferproject/spi/api/transport/UrlGetStreamer.java