- java.lang.Object
-
- org.sqlite.util.ResourceFinder
-
public class ResourceFinder extends Object
Resource address finder for files inside the jar file- Author:
- leo
-
-
Constructor Summary
Constructors Constructor Description ResourceFinder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static URL
find(Class<?> referenceClass, String resourceFileName)
Gets theURL
of the file resourcestatic URL
find(ClassLoader classLoader, Package basePackage, String resourceFileName)
Finds theURL
of the resourcestatic URL
find(ClassLoader classLoader, String packageName, String resourceFileName)
Finds theURL
of the resource
-
-
-
Method Detail
-
find
public static URL find(Class<?> referenceClass, String resourceFileName)
Gets theURL
of the file resource- Parameters:
referenceClass
- 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 referenceClass- Returns:
- the URL of the file resource
-
find
public static URL find(ClassLoader classLoader, Package basePackage, String resourceFileName)
Finds theURL
of the resource- Parameters:
basePackage
- the base package to find the resourceresourceFileName
- the resource file name relative to the package folder- Returns:
- the URL of the specified resource
-
find
public static URL find(ClassLoader classLoader, String packageName, String resourceFileName)
Finds theURL
of the resource- Parameters:
packageName
- the base package name to find the resourceresourceFileName
- the resource file name relative to the package folder- Returns:
- the URL of the specified resource
-
-