com.nostra13.universalimageloader.cache.disc
Class BaseDiscCache

java.lang.Object
  extended by com.nostra13.universalimageloader.cache.disc.BaseDiscCache
All Implemented Interfaces:
DiscCacheAware
Direct Known Subclasses:
LimitedAgeDiscCache, LimitedDiscCache, UnlimitedDiscCache

public abstract class BaseDiscCache
extends java.lang.Object
implements DiscCacheAware

Base disc cache. Implements common functionality for disc cache.

Since:
1.0.0
Author:
Sergey Tarasevich (nostra13[at]gmail[dot]com)
See Also:
DiscCacheAware, FileNameGenerator

Field Summary
protected  java.io.File cacheDir
           
 
Constructor Summary
BaseDiscCache(java.io.File cacheDir)
           
BaseDiscCache(java.io.File cacheDir, FileNameGenerator fileNameGenerator)
           
 
Method Summary
 void clear()
          Clears cache directory
 java.io.File get(java.lang.String key)
          Returns file object appropriate incoming key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.nostra13.universalimageloader.cache.disc.DiscCacheAware
put
 

Field Detail

cacheDir

protected java.io.File cacheDir
Constructor Detail

BaseDiscCache

public BaseDiscCache(java.io.File cacheDir)

BaseDiscCache

public BaseDiscCache(java.io.File cacheDir,
                     FileNameGenerator fileNameGenerator)
Method Detail

get

public java.io.File get(java.lang.String key)
Description copied from interface: DiscCacheAware
Returns file object appropriate incoming key.
NOTE: Must not to return a null. Method must return specific file object for incoming key whether file exists or not.

Specified by:
get in interface DiscCacheAware

clear

public void clear()
Description copied from interface: DiscCacheAware
Clears cache directory

Specified by:
clear in interface DiscCacheAware


Copyright © 2011-2013. All Rights Reserved.