de.smartics.properties.spi.config.support
Class UrlUtil

Package class diagram package UrlUtil
java.lang.Object
  extended by de.smartics.properties.spi.config.support.UrlUtil

public final class UrlUtil
     
     
extends Object

Utiliy methody regarding Classloader URLs.


Constructor Summary
UrlUtil()
           
 
Method Summary
static Enumeration<URL> getResourceUrls(ClassLoader classLoader, String resourceName)
          Get all resourceURLs of the given class loader.
static Enumeration<URL> getResourceUrlsFromFolder(ClassLoader classLoader, String resourceFolderName)
          Get all resourceURLs of the given class loader.
static URL shortenUrl(URL current, String resourceName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlUtil

public UrlUtil()
Method Detail

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.