org.apache.cxf.common.util

## Class URIParserUtil

- java.lang.Object
- - org.apache.cxf.common.util.URIParserUtil

-     public final class URIParserUtil
      extends Object

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `containsReservedKeywords(String token)`
    `static String` | `escapeChars(String s)`
    `static String` | `getAbsoluteURI(String arg)`
    `static String` | `getNamespace(String packageName)`
    `static String` | `getPackageName(String nameSpaceURI)`
    `static String` | `normalize(String uri)`
    `static String` | `parsePackageName(String namespace, String defaultPackageName)`
    `static URL[]` | `pathToURLs(String path)`
    `static String` | `relativize(String base, String toBeRelativized)`
    `static String` | `relativize(URI baseURI, URI toBeRelativizedURI)` This is a custom implementation for doing what URI.relativize(URI uri) should be doing but is not actually doing when URI roots do not fully match.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### pathToURLs

          public static URL[] pathToURLs(String path)

    - #### parsePackageName

          public static String parsePackageName(String namespace,
                                String defaultPackageName)

    - #### getPackageName

          public static String getPackageName(String nameSpaceURI)

    - #### getNamespace

          public static String getNamespace(String packageName)

    - #### containsReservedKeywords

          public static boolean containsReservedKeywords(String token)

    - #### escapeChars

          public static String escapeChars(String s)

    - #### normalize

          public static String normalize(String uri)

    - #### getAbsoluteURI

          public static String getAbsoluteURI(String arg)

    - #### relativize

          public static String relativize(String base,
                          String toBeRelativized)
                                   throws URISyntaxException

      Throws:
        `URISyntaxException`

    - #### relativize

          public static String relativize(URI baseURI,
                          URI toBeRelativizedURI)
                                   throws URISyntaxException

      This is a custom implementation for doing what URI.relativize(URI uri) should be doing but is not actually doing when URI roots do not fully match. See http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6226081
      Parameters:
        `base` - The base URI
        `toBeRelativized` - The URI to be realivized
      Returns:
        The string value of the URI you'd expect to get as result of calling baseURI.relativize(toBeRelativizedURI). null is returned if the parameters are null or are not both absolute or not absolute.
      Throws:
        `URISyntaxException`

Apache CXF