com.octo.android.robospice.persistence.binary
Class InFileBitmapObjectPersister
java.lang.Object
com.octo.android.robospice.persistence.ObjectPersister<T>
com.octo.android.robospice.persistence.file.InFileObjectPersister<android.graphics.Bitmap>
com.octo.android.robospice.persistence.binary.InFileBitmapObjectPersister
- All Implemented Interfaces:
- CacheCleaner, Persister
public class InFileBitmapObjectPersister
- extends InFileObjectPersister<android.graphics.Bitmap>
Stores and retrieves bitmaps to/from file system. Support custom
BitmapFactory.Options
to lower disk usage.
- Author:
- David Stemmer
Methods inherited from class com.octo.android.robospice.persistence.file.InFileObjectPersister |
fromKey, getAllCacheKeys, getCacheFile, getCacheFolder, getCachePrefix, getCreationDateInCache, getKeySanitizer, isCachedAndNotExpired, isCachedAndNotExpired, isDataInCache, isUsingKeySanitizer, loadAllDataFromCache, loadDataFromCache, removeAllDataFromCache, removeDataFromCache, setCacheFolder, setKeySanitizer, toKey |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InFileBitmapObjectPersister
public InFileBitmapObjectPersister(android.app.Application application)
throws CacheCreationException
- Throws:
CacheCreationException
InFileBitmapObjectPersister
public InFileBitmapObjectPersister(android.app.Application application,
File cacheFolder)
throws CacheCreationException
- Throws:
CacheCreationException
readCacheDataFromFile
protected android.graphics.Bitmap readCacheDataFromFile(File file)
throws CacheLoadingException
- Specified by:
readCacheDataFromFile
in class InFileObjectPersister<android.graphics.Bitmap>
- Throws:
CacheLoadingException
saveDataToCacheAndReturnData
public android.graphics.Bitmap saveDataToCacheAndReturnData(android.graphics.Bitmap data,
Object cacheKey)
throws CacheSavingException
- Specified by:
saveDataToCacheAndReturnData
in class ObjectPersister<android.graphics.Bitmap>
- Throws:
CacheSavingException
getDecodingOptions
public android.graphics.BitmapFactory.Options getDecodingOptions()
setDecodingOptions
public void setDecodingOptions(android.graphics.BitmapFactory.Options decodingOptions)
getCompressFormat
public android.graphics.Bitmap.CompressFormat getCompressFormat()
setCompressFormat
public void setCompressFormat(android.graphics.Bitmap.CompressFormat compressFormat)
getQuality
public int getQuality()
setQuality
public void setQuality(int quality)
Copyright © 2012-2014. All Rights Reserved.