|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.log4j.lf5.viewer.configure.MRUFileManager
public class MRUFileManager
MRUFileManager handles the storage and retrival the most recently opened log files.
Constructor Summary | |
---|---|
MRUFileManager()
|
|
MRUFileManager(int maxSize)
|
Method Summary | |
---|---|
static void |
createConfigurationDirectory()
Creates the directory where the MRU file list will be written. |
java.lang.Object |
getFile(int index)
Returns a particular file name stored in a MRU file list based on an index value. |
protected java.lang.String |
getFilename()
|
protected java.io.InputStream |
getInputStream(java.io.File file)
Gets an input stream for the corresponding file. |
java.io.InputStream |
getInputStream(int index)
Returns a input stream to the resource at the specified index |
protected java.io.InputStream |
getInputStream(java.net.URL url)
Gets an input stream for the corresponding URL. |
java.lang.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. |
void |
moveToTop(int index)
Moves the the index to the top of the MRU List |
void |
save()
Saves a list of MRU files out to a file. |
void |
set(java.io.File file)
Adds a file name to the MRU file list. |
void |
set(java.net.URL url)
Adds a url to the MRU file list. |
protected void |
setMaxSize(int maxSize)
Ensures that the MRU list will have a MaxSize. |
protected void |
setMRU(java.lang.Object o)
Adds an object to the mru. |
int |
size()
Gets the size of the MRU file list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MRUFileManager()
public MRUFileManager(int maxSize)
Method Detail |
---|
public void save()
public int size()
public java.lang.Object getFile(int index)
public java.io.InputStream getInputStream(int index) throws java.io.IOException, java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundException
public void set(java.io.File file)
public void set(java.net.URL url)
public java.lang.String[] getMRUFileList()
public void moveToTop(int index)
index
- The index to be first in the mru listpublic static void createConfigurationDirectory()
protected java.io.InputStream getInputStream(java.io.File file) throws java.io.IOException, java.io.FileNotFoundException
file
- The file to create the input stream from.
java.io.IOException
java.io.FileNotFoundException
protected java.io.InputStream getInputStream(java.net.URL url) throws java.io.IOException
url
- The url to create the input stream from.
java.io.IOException
protected void setMRU(java.lang.Object o)
protected void load()
protected java.lang.String getFilename()
protected void setMaxSize(int maxSize)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |