org.apache.tomcat.util.buf

## Class UriUtil

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

-     public final class UriUtil
      extends Object

  Utility class for working with URIs and URLs.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static URL` | `buildJarSafeUrl(File file)`
    `static URL` | `buildJarUrl(File jarFile)`
    `static URL` | `buildJarUrl(File jarFile, String entryPath)`
    `static URL` | `buildJarUrl(String fileUrlString)`
    `static URL` | `buildJarUrl(String fileUrlString, String entryPath)`
    `static boolean` | `hasScheme(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(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 URL buildJarUrl(File jarFile)
                                 throws MalformedURLException

      Throws:
        `MalformedURLException`

    - #### buildJarUrl

          public static URL buildJarUrl(File jarFile,
                        String entryPath)
                                 throws MalformedURLException

      Throws:
        `MalformedURLException`

    - #### buildJarUrl

          public static URL buildJarUrl(String fileUrlString)
                                 throws MalformedURLException

      Throws:
        `MalformedURLException`

    - #### buildJarUrl

          public static URL buildJarUrl(String fileUrlString,
                        String entryPath)
                                 throws MalformedURLException

      Throws:
        `MalformedURLException`

    - #### buildJarSafeUrl

          public static URL buildJarSafeUrl(File file)
                                     throws MalformedURLException

      Throws:
        `MalformedURLException`

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