com.octo.android.robospice.persistence.string
Class InFileStringObjectPersister

java.lang.Object
  extended by com.octo.android.robospice.persistence.ObjectPersister<T>
      extended by com.octo.android.robospice.persistence.file.InFileObjectPersister<String>
          extended by com.octo.android.robospice.persistence.string.InFileStringObjectPersister
All Implemented Interfaces:
CacheCleaner, Persister

public class InFileStringObjectPersister
extends InFileObjectPersister<String>


Constructor Summary
InFileStringObjectPersister(android.app.Application application)
           
 
Method Summary
 boolean canHandleClass(Class<?> clazz)
          Whether or not this bus element can persist/unpersist objects of the given class clazz.
protected  String readCacheDataFromFile(File file)
           
 String saveDataToCacheAndReturnData(String data, Object cacheKey)
           
 
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 com.octo.android.robospice.persistence.ObjectPersister
getApplication, getHandledClass, isAsyncSaveEnabled, setAsyncSaveEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InFileStringObjectPersister

public InFileStringObjectPersister(android.app.Application application)
                            throws CacheCreationException
Throws:
CacheCreationException
Method Detail

canHandleClass

public boolean canHandleClass(Class<?> clazz)
Description copied from interface: Persister
Whether or not this bus element can persist/unpersist objects of the given class clazz.

Specified by:
canHandleClass in interface Persister
Overrides:
canHandleClass in class ObjectPersister<String>
Parameters:
clazz - the class of objets we are looking forward to persist.
Returns:
true if this bus element can persist/unpersist objects of the given class clazz. False otherwise.

readCacheDataFromFile

protected String readCacheDataFromFile(File file)
                                throws CacheLoadingException
Specified by:
readCacheDataFromFile in class InFileObjectPersister<String>
Throws:
CacheLoadingException

saveDataToCacheAndReturnData

public String saveDataToCacheAndReturnData(String data,
                                           Object cacheKey)
                                    throws CacheSavingException
Specified by:
saveDataToCacheAndReturnData in class ObjectPersister<String>
Throws:
CacheSavingException


Copyright © 2012-2014. All Rights Reserved.