Package org.sqlite.util
Class ResourceFinder
- java.lang.Object
-
- org.sqlite.util.ResourceFinder
-
public class ResourceFinder extends java.lang.ObjectResource address finder for files inside the jar file- Author:
- leo
-
-
Constructor Summary
Constructors Constructor Description ResourceFinder()
-
Method Summary
Modifier and Type Method Description static java.net.URLfind(java.lang.Class<?> referenceClass, java.lang.String resourceFileName)Gets theURLof the file resourcestatic java.net.URLfind(java.lang.ClassLoader classLoader, java.lang.Package basePackage, java.lang.String resourceFileName)Finds theURLof the resourcestatic java.net.URLfind(java.lang.ClassLoader classLoader, java.lang.String packageName, java.lang.String resourceFileName)Finds theURLof the resource
-
-
-
Method Detail
-
find
public static java.net.URL find(java.lang.Class<?> referenceClass, java.lang.String resourceFileName)Gets theURLof 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 java.net.URL find(java.lang.ClassLoader classLoader, java.lang.Package basePackage, java.lang.String resourceFileName)Finds theURLof 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 java.net.URL find(java.lang.ClassLoader classLoader, java.lang.String packageName, java.lang.String resourceFileName)Finds theURLof 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
-
-