org.apache.tomcat.util.buf

## Class UriUtil

- java.lang.Object
- - org.apache.tomcat.util.buf.UriUtil

-     public final class UriUtil
      extends java.lang.Object

  Utility class for working with URIs and URLs.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.net.URL` | `buildJarSafeUrl(java.io.File file)`
    `static java.net.URL` | `buildJarUrl(java.io.File jarFile)`
    `static java.net.URL` | `buildJarUrl(java.io.File jarFile, java.lang.String entryPath)`
    `static java.net.URL` | `buildJarUrl(java.lang.String fileUrlString)`
    `static java.net.URL` | `buildJarUrl(java.lang.String fileUrlString, java.lang.String entryPath)`
    `static boolean` | `hasScheme(java.lang.CharSequence uri)` Determine if a URI string has a `scheme` component.

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

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

- - ### Method Detail

    - #### hasScheme

          public static boolean hasScheme(java.lang.CharSequence uri)

      Determine if a URI string has a `scheme` component.
      Parameters:
        `uri` - The URI to test
      Returns:
        `true` if a scheme is present, otherwise {code @false}

    - #### buildJarUrl

          public static java.net.URL buildJarUrl(java.io.File jarFile)
                                          throws java.net.MalformedURLException

      Throws:
        `java.net.MalformedURLException`

    - #### buildJarUrl

          public static java.net.URL buildJarUrl(java.io.File jarFile,
                                 java.lang.String entryPath)
                                          throws java.net.MalformedURLException

      Throws:
        `java.net.MalformedURLException`

    - #### buildJarUrl

          public static java.net.URL buildJarUrl(java.lang.String fileUrlString)
                                          throws java.net.MalformedURLException

      Throws:
        `java.net.MalformedURLException`

    - #### buildJarUrl

          public static java.net.URL buildJarUrl(java.lang.String fileUrlString,
                                 java.lang.String entryPath)
                                          throws java.net.MalformedURLException

      Throws:
        `java.net.MalformedURLException`

    - #### buildJarSafeUrl

          public static java.net.URL buildJarSafeUrl(java.io.File file)
                                              throws java.net.MalformedURLException

      Throws:
        `java.net.MalformedURLException`

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.