AndBase开发框架  1.5.8r3
 全部  命名空间 文件 函数 变量 枚举值 
静态 Public 成员函数 | 静态 Public 属性 | 静态包函数 | 静态 Private 属性 | 所有成员列表
com.ab.bitmap.AbFileCache类 参考

静态 Public 成员函数

static File getFileFromCache (String name)
 
static void addFileToCache (String name, File file)
 
static void removeFileFromCache (String name)
 
static void removeAllFileFromCache ()
 
static void setMaxCacheSize (int cacheSize)
 
static int getCacheSize ()
 

静态 Public 属性

static int maxCacheSize = 10 * 1024 * 1024
 
static int cacheSize = 0
 
static final ReentrantLock lock = new ReentrantLock()
 

静态包函数

 [static initializer]
 

静态 Private 属性

static final HashMap< String,
File > 
fileCache = new HashMap<String, File>()
 

详细描述

© 2012 amsoft.cn 名称:AbFileCache.java 描述:文件SD卡缓存管理.

作者
还如一梦中
版本
v1.0
日期
:2013-5-23 上午10:10:53

成员函数说明

com.ab.bitmap.AbFileCache.[static initializer] ( )
inlinestaticpackage
static void com.ab.bitmap.AbFileCache.addFileToCache ( String  name,
File  file 
)
inlinestatic

描述:增加一个File到缓存.

参数
name文件名
filethe file
static int com.ab.bitmap.AbFileCache.getCacheSize ( )
inlinestatic

描述:缓存文件夹的大小.

返回
the cache size
static File com.ab.bitmap.AbFileCache.getFileFromCache ( String  name)
inlinestatic

描述:从缓存中获取这个File.

参数
name文件名
返回
the file from mem cache
static void com.ab.bitmap.AbFileCache.removeAllFileFromCache ( )
inlinestatic

描述:清空缓存的Bitmap.

static void com.ab.bitmap.AbFileCache.removeFileFromCache ( String  name)
inlinestatic

描述:从缓存删除.

参数
name文件名
static void com.ab.bitmap.AbFileCache.setMaxCacheSize ( int  cacheSize)
inlinestatic

设置缓存空间大小 .

参数
cacheSizethe new max cache size

类成员变量说明

int com.ab.bitmap.AbFileCache.cacheSize = 0
static

当前缓存大小.

final HashMap<String, File> com.ab.bitmap.AbFileCache.fileCache = new HashMap<String, File>()
staticprivate

文件缓存(文件名,文件).

final ReentrantLock com.ab.bitmap.AbFileCache.lock = new ReentrantLock()
static

锁对象.

int com.ab.bitmap.AbFileCache.maxCacheSize = 10 * 1024 * 1024
static

10MB.


该类的文档由以下文件生成: