de.smartics.properties.spi.config.support
Class UrlUtil
java.lang.Object
de.smartics.properties.spi.config.support.UrlUtil
-
public final class UrlUtil
-
extends
Object
Utiliy methody regarding Classloader URLs.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UrlUtil
public UrlUtil()
getResourceUrlsFromFolder
public static Enumeration<URL> getResourceUrlsFromFolder(ClassLoader classLoader,
String resourceFolderName)
throws IOException
-
Get all resourceURLs of the given class loader.
-
-
Parameters:
-
classLoader
- the class loader from which all resource URLs shall be fetched.
-
Returns:
-
the enumeration of resource URLs of the given class loader.
-
Throws:
-
IOException
- when the URL can not be retrieved.
getResourceUrls
public static Enumeration<URL> getResourceUrls(ClassLoader classLoader,
String resourceName)
throws IOException
-
Get all resourceURLs of the given class loader.
-
-
Parameters:
-
classLoader
- the class loader from which all resource URLs shall be fetched.
-
Returns:
-
the enumeration of resource URLs of the given class loader.
-
Throws:
-
IOException
- when the URL can not be retrieved.
shortenUrl
public static URL shortenUrl(URL current,
String resourceName)
throws MalformedURLException
-
-
Throws:
-
MalformedURLException
Copyright © 2012-2013
Kronseder & Reiner GmbH - smartics. All Rights Reserved.