public abstract class ResourceUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CLASSPATH_URL_PREFIX |
static String |
FILE_URL_PREFIX |
static String |
JAR_URL_SEPARATOR |
static String |
URL_PROTOCOL_CODE_SOURCE |
static String |
URL_PROTOCOL_FILE |
static String |
URL_PROTOCOL_JAR |
static String |
URL_PROTOCOL_VFS |
static String |
URL_PROTOCOL_VFSZIP |
static String |
URL_PROTOCOL_WSJAR |
static String |
URL_PROTOCOL_ZIP |
Constructor and Description |
---|
ResourceUtils() |
Modifier and Type | Method and Description |
---|---|
static URL |
extractJarFileURL(URL jarUrl) |
static File |
getFile(String resourceLocation) |
static File |
getFile(URI resourceUri) |
static File |
getFile(URI resourceUri,
String description) |
static File |
getFile(URL resourceUrl) |
static File |
getFile(URL resourceUrl,
String description) |
static URL |
getURL(String resourceLocation) |
static boolean |
isFileURL(URL url) |
static boolean |
isJarURL(URL url) |
static boolean |
isUrl(String resourceLocation) |
static URI |
toURI(String location) |
static URI |
toURI(URL url) |
static void |
useCachesIfNecessary(URLConnection con) |
public static final String CLASSPATH_URL_PREFIX
public static final String FILE_URL_PREFIX
public static final String URL_PROTOCOL_FILE
public static final String URL_PROTOCOL_JAR
public static final String URL_PROTOCOL_ZIP
public static final String URL_PROTOCOL_VFSZIP
public static final String URL_PROTOCOL_VFS
public static final String URL_PROTOCOL_WSJAR
public static final String URL_PROTOCOL_CODE_SOURCE
public static final String JAR_URL_SEPARATOR
public static boolean isUrl(String resourceLocation)
public static URL getURL(String resourceLocation) throws FileNotFoundException
FileNotFoundException
public static File getFile(String resourceLocation) throws FileNotFoundException
FileNotFoundException
public static File getFile(URL resourceUrl) throws FileNotFoundException
FileNotFoundException
public static File getFile(URL resourceUrl, String description) throws FileNotFoundException
FileNotFoundException
public static File getFile(URI resourceUri) throws FileNotFoundException
FileNotFoundException
public static File getFile(URI resourceUri, String description) throws FileNotFoundException
FileNotFoundException
public static boolean isFileURL(URL url)
public static boolean isJarURL(URL url)
public static URL extractJarFileURL(URL jarUrl) throws MalformedURLException
MalformedURLException
public static URI toURI(URL url) throws URISyntaxException
URISyntaxException
public static URI toURI(String location) throws URISyntaxException
URISyntaxException
public static void useCachesIfNecessary(URLConnection con)
Copyright © 2016. All Rights Reserved.