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
MalformedURLException
public static URL buildJarUrl(File jarFile, String entryPath) throws MalformedURLException
MalformedURLException
public static URL buildJarUrl(String fileUrlString) throws MalformedURLException
MalformedURLException
public static URL buildJarUrl(String fileUrlString, String entryPath) throws MalformedURLException
MalformedURLException
public static URL buildJarSafeUrl(File file) throws MalformedURLException
MalformedURLException
public 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 testCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.