Class ResourceFinder

java.lang.Object
org.sqlite.util.ResourceFinder

public class ResourceFinder extends Object
Resource address finder for files inside the jar file
  • Constructor Details

    • ResourceFinder

      public ResourceFinder()
  • Method Details

    • find

      public static URL find(Class<?> referenceClass, String resourceFileName)
      Gets the URL 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 the URL of the resource
      Parameters:
      basePackage - the base package to find the resource
      resourceFileName - 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 the URL of the resource
      Parameters:
      packageName - the base package name to find the resource
      resourceFileName - the resource file name relative to the package folder
      Returns:
      the URL of the specified resource
    • packagePath

      private static String packagePath(Class<?> referenceClass)
    • packagePath

      private static String packagePath(Package basePackage)
      Parameters:
      basePackage - Package object
      Returns:
      Package path String in the unix-like format.
    • packagePath

      private static String packagePath(String packageName)
      Parameters:
      packageName - Package name string
      Returns:
      Package path String in the unix-like format.