public class ResourceFinder extends Object
Constructor and Description |
---|
ResourceFinder() |
Modifier and Type | Method and Description |
---|---|
static URL |
find(Class<?> referenceClass,
String resourceFileName)
Gets the
URL of the file resource |
static URL |
find(ClassLoader classLoader,
Package basePackage,
String resourceFileName)
Finds the
URL of the resource |
static URL |
find(ClassLoader classLoader,
String packageName,
String resourceFileName)
Finds the
URL of the resource |
public static URL find(Class<?> referenceClass, String resourceFileName)
URL
of the file resourcereferenceClass
- the base class for finding resources files. This method will
search the package containing the given referenceClass.resourceFileName
- the resource file name relative to the package of the
referenceClasspublic static URL find(ClassLoader classLoader, Package basePackage, String resourceFileName)
URL
of the resourcebasePackage
- the base package to find the resourceresourceFileName
- the resource file name relative to the package folderpublic static URL find(ClassLoader classLoader, String packageName, String resourceFileName)
URL
of the resourcepackageName
- the base package name to find the resourceresourceFileName
- the resource file name relative to the package folderCopyright © 2019. All rights reserved.