code: public URLConnection asURLConnection() {
          URLConnection uc = getURLConnection();
          if (uc != null) return uc;
          try {
              return new InputStreamURLConnection(
                      getResourceURLOrSystemId(), 
                      this, 
                      getDefaultUrlConnectionHeader());
          } catch (Exception e) {
              throw resolvingException(e);
          }
      }
docs: Returns the resource as URL connection, converting it if necessary.
  <p>
  See the docs of {@linkplain RResult} for notes on data conversion.
  @return URL connection