com.arjuna.common.util
Class FileLocator

java.lang.Object
  extended by com.arjuna.common.util.FileLocator

public class FileLocator
extends java.lang.Object

The FileLocator class provides a common method for locating files. If not passed an absolute filename (starting with the string "abs://"), it searches for the file in the order: in the directory specified by the system property user.dir in the directory specified by the system property user.home in the directory specified by the system property java.home using the getResource() method

Since:
JTS 3.0.
Version:
$Id: FileLocator.java 2342 2006-03-30 13:06:17Z $
Author:
Julian Coleman

Constructor Summary
FileLocator()
           
 
Method Summary
static java.lang.String locateFile(java.lang.String findFile)
          Locate the specific file.
static java.net.URL locateURL(java.lang.String findFile)
          Locate the specific file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileLocator

public FileLocator()
Method Detail

locateFile

public static java.lang.String locateFile(java.lang.String findFile)
                                   throws java.io.FileNotFoundException
Locate the specific file. Return the (URL decoded) abolute pathname to the file or null.

Throws:
java.io.FileNotFoundException

locateURL

public static java.net.URL locateURL(java.lang.String findFile)
                              throws java.io.FileNotFoundException
Locate the specific file. Return the file name in URL form or null.

Throws:
java.io.FileNotFoundException