Save This Page
Home » slf4j-1.5.5 » org.apache » log4j » lf5 » viewer » configure » [javadoc | source]
org.apache.log4j.lf5.viewer.configure
public class: MRUFileManager [javadoc | source]
java.lang.Object
   org.apache.log4j.lf5.viewer.configure.MRUFileManager

MRUFileManager handles the storage and retrival the most recently opened log files.

Constructor:
 public MRUFileManager() 
 public MRUFileManager(int maxSize) 
Method from org.apache.log4j.lf5.viewer.configure.MRUFileManager Summary:
createConfigurationDirectory,   getFile,   getFilename,   getInputStream,   getInputStream,   getInputStream,   getMRUFileList,   load,   moveToTop,   save,   set,   set,   setMRU,   setMaxSize,   size
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.log4j.lf5.viewer.configure.MRUFileManager Detail:
 public static  void createConfigurationDirectory() 
    Creates the directory where the MRU file list will be written. The "lf5" directory is created in the Documents and Settings directory on Windows 2000 machines and where ever the user.home variable points on all other platforms.
 public Object getFile(int index) 
    Returns a particular file name stored in a MRU file list based on an index value.
 protected String getFilename() 
 public InputStream getInputStream(int index) throws IOException, FileNotFoundException 
    Returns a input stream to the resource at the specified index
 protected InputStream getInputStream(File file) throws IOException, FileNotFoundException 
    Gets an input stream for the corresponding file.
 protected InputStream getInputStream(URL url) throws IOException 
    Gets an input stream for the corresponding URL.
 public String[] getMRUFileList() 
    Gets the list of files stored in the MRU file list.
 protected  void load() 
    Loads the MRU file list in from a file and stores it in a LinkedList. If no file exists, a new LinkedList is created.
 public  void moveToTop(int index) 
    Moves the the index to the top of the MRU List
 public  void save() 
    Saves a list of MRU files out to a file.
 public  void set(File file) 
    Adds a file name to the MRU file list.
 public  void set(URL url) 
    Adds a url to the MRU file list.
 protected  void setMRU(Object o) 
    Adds an object to the mru.
 protected  void setMaxSize(int maxSize) 
    Ensures that the MRU list will have a MaxSize.
 public int size() 
    Gets the size of the MRU file list.