com.bankframe.admin.tools
Class FindFileInClassPath

java.lang.Object
  extended by com.bankframe.admin.tools.FindFileInClassPath

public class FindFileInClassPath
extends Object

Determine the directory/jar a class is located in ClassPath


Field Summary
static String CLASS_PATH_KEY
           
static String JAR_SUFFIX
           
static String PATH_SEPARATOR_KEY
           
static String ZIP_SUFFIX
           
 
Method Summary
static String findFileInClassPath(String fileName)
          This method gets the parent folder where the specified file name is located
static String findFileInPath(String pathToSearch, String pathSeparator, String fileName)
          This method searches the path for the filename
static boolean isFileInFolder(String folderPath, String filePath)
          This method searches the folder for the filename
static boolean isFileInJar(String jarPath, String filePath)
          This method checks the Jar for the File
static boolean isFileInPath(String path, String file)
          This method checks the Jar for the File
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_PATH_KEY

public static final String CLASS_PATH_KEY
See Also:
Constant Field Values

PATH_SEPARATOR_KEY

public static final String PATH_SEPARATOR_KEY
See Also:
Constant Field Values

JAR_SUFFIX

public static final String JAR_SUFFIX
See Also:
Constant Field Values

ZIP_SUFFIX

public static final String ZIP_SUFFIX
See Also:
Constant Field Values
Method Detail

findFileInClassPath

public static String findFileInClassPath(String fileName)
This method gets the parent folder where the specified file name is located

Parameters:
fileName - String the fileName searched for.
Returns:
file path

findFileInPath

public static String findFileInPath(String pathToSearch,
                                    String pathSeparator,
                                    String fileName)
This method searches the path for the filename

Parameters:
pathToSearch - String the path
pathSeparator - String the path separator key
fileName - String the file name searched for
Returns:
file path or null

isFileInFolder

public static boolean isFileInFolder(String folderPath,
                                     String filePath)
This method searches the folder for the filename

Parameters:
folderPath - String the folderPath searched
filePath - String
Returns:
file path

isFileInJar

public static boolean isFileInJar(String jarPath,
                                  String filePath)
This method checks the Jar for the File

Parameters:
jarPath - String the path
filePath - String the file name searched for
Returns:
file path or null

isFileInPath

public static boolean isFileInPath(String path,
                                   String file)
This method checks the Jar for the File

Parameters:
path - String the path
file - String the file name searched for
Returns:
file path or null

main

public static void main(String[] args)


Copyright © 2005, 2007, Oracle. All rights reserved.