com.ls.util.io
Class FileTool
java.lang.Object
|
+--com.ls.util.io.FileTool
- public class FileTool
- extends Object
The FileTool class loads files and caches them if needed.
- Version:
- $Revision: 1.0 $
- Author:
- Last modified by $Author: TBerk $
Constructor Summary |
FileTool()
Constructor with no additional method calls. |
Method Summary |
String |
loadFile(String fileName)
Loads a file and caches it, if the flag is set. |
static void |
setCache(boolean result)
Sets the flag, which indicates whether the files should be cached or not. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileTool
public FileTool()
- Constructor with no additional method calls.
loadFile
public String loadFile(String fileName)
- Loads a file and caches it, if the flag is set.
- Parameters:
fileName
- Name of file to load.- Returns:
- Returns the content of the file. If an error occurs then returns null
setCache
public static void setCache(boolean result)
- Sets the flag, which indicates whether the files should be cached or not.
- Parameters:
result
- set true to use cache, false if not