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 $

Method Index

 o inCache(String)
determines if the specified file is in the cache.
 o length(String)
 o loadFile(String)
Attempt to load a file into the cache.
 o run()
Activate this as a single thread that won't get garbage collected.
 o toString(String)

Methods

 o run
 public void run()
Activate this as a single thread that won't get garbage collected.

 o length
 public static int length(String filespec)
 o toString
 public static String toString(String filespec)
 o 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.
 o 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