public final class UriUtil extends Object
| 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 String |
getWarSeparator() |
static boolean |
hasScheme(CharSequence uri)
Determine if a URI string has a
scheme component. |
static boolean |
isAbsoluteURI(String path)
Does the provided path start with
file:/ or
<protocol>://. |
static URL |
warToJar(URL warUrl)
Convert a URL of the form
war:file:... |
public static boolean hasScheme(CharSequence uri)
scheme component.uri - The URI to testtrue if a scheme is present, otherwise {code @false}public static URL buildJarUrl(File jarFile) throws MalformedURLException
MalformedURLExceptionpublic static URL buildJarUrl(File jarFile, String entryPath) throws MalformedURLException
MalformedURLExceptionpublic static URL buildJarUrl(String fileUrlString) throws MalformedURLException
MalformedURLExceptionpublic static URL buildJarUrl(String fileUrlString, String entryPath) throws MalformedURLException
MalformedURLExceptionpublic static URL buildJarSafeUrl(File file) throws MalformedURLException
MalformedURLExceptionpublic static URL warToJar(URL warUrl) throws MalformedURLException
war:file:... to
jar:file:....warUrl - The WAR URL to convertMalformedURLException - If the conversion failspublic static String getWarSeparator()
public static boolean isAbsoluteURI(String path)
file:/ or
<protocol>://.path - The path to test if the supplied path starts with once of the recognised
sequences.Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.