|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.xwork2.util.FileManager
public class FileManager
FileManager
This class was brought in from oscore trunk revision 147.
Nested Class Summary | |
---|---|
private static class |
FileManager.FileRevision
Represents file resource revision, used for file://* resources |
private static class |
FileManager.JarEntryRevision
Represents jar resurce revision, used for jar://* resource |
private static class |
FileManager.JBossFileRevision
Represents file resource revision, used for vfszip://* resources |
private static class |
FileManager.Revision
Class represents common revsion resource, should be used as default class when no other option exists |
Field Summary | |
---|---|
private static Map<String,FileManager.Revision> |
files
|
private static String |
JAR_FILE_EXTENSION_END
|
private static String |
JAR_FILE_NAME_SEPARATOR
|
private static Logger |
LOG
|
protected static boolean |
reloadingConfigs
|
Constructor Summary | |
---|---|
private |
FileManager()
|
Method Summary | |
---|---|
static boolean |
fileNeedsReloading(String fileName)
|
static boolean |
fileNeedsReloading(String fileName,
Class clazz)
|
static boolean |
isReloadingConfigs()
|
static InputStream |
loadFile(String fileName,
Class clazz)
Loads opens the named file and returns the InputStream |
static InputStream |
loadFile(URL fileUrl)
Loads opens the named file and returns the InputStream |
static InputStream |
loadFile(URL fileUrl,
boolean openStream)
Loads opens the named file and returns the InputStream |
static void |
setReloadingConfigs(boolean reloadingConfigs)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static Logger LOG
private static Map<String,FileManager.Revision> files
protected static boolean reloadingConfigs
private static final String JAR_FILE_NAME_SEPARATOR
private static final String JAR_FILE_EXTENSION_END
Constructor Detail |
---|
private FileManager()
Method Detail |
---|
public static void setReloadingConfigs(boolean reloadingConfigs)
public static boolean isReloadingConfigs()
public static boolean fileNeedsReloading(String fileName, Class clazz)
public static boolean fileNeedsReloading(String fileName)
public static InputStream loadFile(String fileName, Class clazz)
fileName
- - the name of the file to open
IllegalArgumentException
- if there is no file with the given file namepublic static InputStream loadFile(URL fileUrl)
fileUrl
- - the URL of the file to open
IllegalArgumentException
- if there is no file with the given file namepublic static InputStream loadFile(URL fileUrl, boolean openStream)
fileUrl
- - the URL of the file to openopenStream
- - if true, open an InputStream to the file and return it
IllegalArgumentException
- if there is no file with the given file name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |