com.opensymphony.xwork2.util
Class FileManager

java.lang.Object
  extended by com.opensymphony.xwork2.util.FileManager

public class FileManager
extends java.lang.Object

FileManager

This class was brought in from oscore trunk revision 147.

Author:
Jason Carreira Created May 7, 2003 8:44:26 PM

Field Summary
protected static boolean reloadingConfigs
           
 
Method Summary
static boolean fileNeedsReloading(java.lang.String fileName)
           
static boolean fileNeedsReloading(java.lang.String fileName, java.lang.Class clazz)
           
static boolean isReloadingConfigs()
           
static java.io.InputStream loadFile(java.lang.String fileName, java.lang.Class clazz)
          Loads opens the named file and returns the InputStream
static java.io.InputStream loadFile(java.net.URL fileUrl)
          Loads opens the named file and returns the InputStream
static java.io.InputStream loadFile(java.net.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

reloadingConfigs

protected static boolean reloadingConfigs
Method Detail

setReloadingConfigs

public static void setReloadingConfigs(boolean reloadingConfigs)

isReloadingConfigs

public static boolean isReloadingConfigs()

fileNeedsReloading

public static boolean fileNeedsReloading(java.lang.String fileName,
                                         java.lang.Class clazz)

fileNeedsReloading

public static boolean fileNeedsReloading(java.lang.String fileName)

loadFile

public static java.io.InputStream loadFile(java.lang.String fileName,
                                           java.lang.Class clazz)
Loads opens the named file and returns the InputStream

Parameters:
fileName - - the name of the file to open
Returns:
an InputStream of the file contents or null
Throws:
java.lang.IllegalArgumentException - if there is no file with the given file name

loadFile

public static java.io.InputStream loadFile(java.net.URL fileUrl)
Loads opens the named file and returns the InputStream

Parameters:
fileUrl - - the URL of the file to open
Returns:
an InputStream of the file contents or null
Throws:
java.lang.IllegalArgumentException - if there is no file with the given file name

loadFile

public static java.io.InputStream loadFile(java.net.URL fileUrl,
                                           boolean openStream)
Loads opens the named file and returns the InputStream

Parameters:
fileUrl - - the URL of the file to open
openStream - - if true, open an InputStream to the file and return it
Returns:
an InputStream of the file contents or null
Throws:
java.lang.IllegalArgumentException - if there is no file with the given file name


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.