Package org.frankframework.util
Class ClassLoaderUtils
java.lang.Object
org.frankframework.util.ClassLoaderUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic URL
getResourceURL
(String resource) Get a resource-URL directly from the ClassPathstatic URL
getResourceURL
(IScopeProvider scopeProvider, String resource) Get a resource-URL from a specific IConfigurationClassLoader.static URL
getResourceURL
(IScopeProvider scopeProvider, String resource, String allowedProtocols) Get a resource-URL from a ClassLoader, therefore the resource should not start with a leading slash
-
Method Details
-
getResourceURL
Get a resource-URL directly from the ClassPath- Parameters:
resource
- name of the resource you are trying to fetch the URL from- Returns:
- URL of the resource or null if it can't be not found
-
getResourceURL
Get a resource-URL from a specific IConfigurationClassLoader. This should be used by classes which are part of the Ibis configuration (like pipes and senders) because the configuration might be loaded from outside the webapp ClassPath. Hence the Thread.currentThread().getContextClassLoader() at the time the class was instantiated should be used.- See Also:
-
getResourceURL
@Nullable public static URL getResourceURL(@Nullable IScopeProvider scopeProvider, @Nonnull String resource, @Nullable String allowedProtocols) Get a resource-URL from a ClassLoader, therefore the resource should not start with a leading slash- Parameters:
scopeProvider
- to retrieve the file from, or NULL when you want to retrieve the resource directly from the ClassPath (using an absolute path)resource
- name of the resource you are trying to fetch the URL from- Returns:
- URL of the resource or null if it can't be not found
-
getAllowedProtocols
-