|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.blogspot.applications4android.comicreader.core.Cache
public class Cache
Cache folder for a comic
Field Summary | |
---|---|
static java.lang.String |
CACHE
cache folder name |
static int |
MAX_FILES
maximum number of files to be kept in the cache before recycling |
static int |
MIN_FILES
minimum number of files to be kept while cleaning the cache |
Constructor Summary | |
---|---|
Cache(java.io.File root)
Constructor (to be generally used in test-cases) |
|
Cache(java.lang.String name)
Constructor |
Method Summary | |
---|---|
java.lang.String |
cachePath()
Path to the cache folder |
void |
clearCache()
Delete all the files in the cache |
void |
makeSpace()
Clear only the oldest files to make space for newer ones |
int |
numFiles()
Number of files in the cache |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CACHE
public static final int MAX_FILES
public static final int MIN_FILES
Constructor Detail |
---|
public Cache(java.lang.String name)
name
- name of the comic this cache is forpublic Cache(java.io.File root)
root
- root folderMethod Detail |
---|
public java.lang.String cachePath()
public void clearCache()
public void makeSpace()
public int numFiles()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |