All Packages Class Hierarchy This Package Previous Next Index
Class com.andthehorseyourodeinon.utils.FileCache
java.lang.Object
|
+----com.andthehorseyourodeinon.utils.FileCache
- public class FileCache
- extends Object
- implements Runnable
FileCache is a statically-called utility class that caches text files
for various uses. It tries to be intelligent about loading files when needed.
- Version:
- $Id: FileCache.java,v 1.1 2000/05/16 22:45:10 samuelg Exp $
-
inCache(String)
- determines if the specified file is in the cache.
-
length(String)
-
-
loadFile(String)
- Attempt to load a file into the cache.
-
run()
- Activate this as a single thread that won't get garbage collected.
-
toString(String)
-
run
public void run()
- Activate this as a single thread that won't get garbage collected.
length
public static int length(String filespec)
toString
public static String toString(String filespec)
inCache
public static boolean inCache(String filespec)
- determines if the specified file is in the cache. If the file is not in the
cache, it attempts to load the file so it can return "true."
- Parameters:
- filespec - file identifier
- Returns:
- true if the file is in the cache.
loadFile
public static boolean loadFile(String filespec)
- Attempt to load a file into the cache.
- Parameters:
- filespec - file identifier
- Returns:
- true if the file was successfully added to the cache.
All Packages Class Hierarchy This Package Previous Next Index