|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.digi.config.util.PathLocater
A helper class for determining path names.
Field Summary | |
(package private) static java.net.URL |
documentBase
If loaded from the network, this identifies where to find network resources |
(package private) static int |
numDirInClasspath
Number of directories in the classpath. |
Constructor Summary | |
PathLocater()
|
Method Summary | |
static void |
createPathToFile(java.io.File file)
Ensures that the directory path portion of the specified file exists. |
static void |
createPathToFile(java.lang.String fullName)
Ensures that the directory path portion of the specified full file name exists. |
static java.lang.String |
getDefaultSaveFileName(java.lang.String fileName)
Creates a fully qualified file name of the Persistance file. |
static java.net.URL |
getDocumentBase()
Returns the document base currently in use |
static int |
getNumDirInClasspath()
Returns the number of directories in the classpath. |
static java.lang.String |
locateFile(java.lang.String fileName)
This method returns the absolute path name of a file. |
static java.lang.String |
locateFullClassFileName(java.lang.String name)
Returns the fully qualified file name of the provided class. |
static java.lang.String |
locateFullPath(java.lang.String name)
Returns the name of the path from where the provided class was loaded. |
static void |
setDocumentBase(java.net.URL documentBase)
Sets the document base currently in use |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static java.net.URL documentBase
static int numDirInClasspath
Constructor Detail |
public PathLocater()
Method Detail |
public static void setDocumentBase(java.net.URL documentBase)
public static java.net.URL getDocumentBase()
public static java.lang.String locateFullClassFileName(java.lang.String name)
name
- Name of the class. Use package qualified name e.g.com.digi.config.util.PathLocater
public static java.lang.String locateFullPath(java.lang.String name)
name
- Name of the class. Use package qualified name such as
com.digi.config.util.PathLocator
public static int getNumDirInClasspath()
public static java.lang.String locateFile(java.lang.String fileName)
fileName
- Name of the file to locate.
public static java.lang.String getDefaultSaveFileName(java.lang.String fileName)
public static void createPathToFile(java.lang.String fullName)
fullName
- the fully qualified file name whose path is to be created as needed.
java.lang.SecurityException
- If a security manager exists and its SecurityManager.checkWrite(java.lang.String)
method does not
permit the named directory and all necessary parent directories
and to be createdpublic static void createPathToFile(java.io.File file)
file
- the file whose path is to be created as needed.
java.lang.SecurityException
- If a security manager exists and its SecurityManager.checkWrite(java.lang.String)
method does not
permit the named directory and all necessary parent directories
and to be created
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |