Class UriUtils

java.lang.Object
nl.talsmasoftware.umldoclet.util.UriUtils

public final class UriUtils extends Object
Utility class for manipulating URI's
Author:
Sjoerd Talsma
  • Method Details

    • addPathComponent

      public static URI addPathComponent(URI uri, String component)
      This method adds a 'component' to the path of an URI.
      Parameters:
      uri - The URI to add a path component to
      component - The component to add to the end of the uri path, separated by a slash ('/') character
      Returns:
      The new URI
    • addHttpParam

      public static URI addHttpParam(URI uri, String name, String value)
      This method adds a query parameter to an existing URI and takes care of proper encoding etc.

      Since query parameters are scheme-specific, this method only applies to URI's with the following schemes:

      1. "http"
      2. "https"
      Parameters:
      uri - The URI to add an HTTP parameter to
      name - The name of the parameter to add
      value - The value of the parameter to add
      Returns:
      The URI to which a parameter may have been added