@Override
  public void handleArgument(final Argument arg, final String form, final String[] parameters)
      throws UsageException {
    final File file = new File(parameters[0]);
    URL result = null;

    if (file.exists()) {
      try {
        result = file.toURI().toURL();
      } catch (MalformedURLException mux) {
        LOG.log(Level.FINEST, "Caught Exception", mux);
      }
    }
    if (result == null) {
      try {
        result = new URL(parameters[0]);
      } catch (MalformedURLException mux) {
        LOG.log(Level.FINEST, "Caught Exception", mux);
      }
    }
    if (result == null) {
      throw (new UsageException(
          "Argument parameter value is not a valid file " + "path or URL: " + arg));
    }
    parameters[0] = result.toString();
  }
Ensure that the argument is either a file path or a properly formatted URL. If it is a file
path, convert to a URL. If neither, throws a UsageException.

@param arg argument
@param form form used
@param parameters parameters supplied
@throws UsageException when file not found or not a workable URL
extensions/geode-modules-session/src/main/java/org/apache/geode/modules/session/installer/args/URLArgumentHandler.java