com.octo.android.robospice.persistence.binary
Class InFileInputStreamObjectPersister

java.lang.Object
  extended by com.octo.android.robospice.persistence.ObjectPersister<T>
      extended by com.octo.android.robospice.persistence.file.InFileObjectPersister<InputStream>
          extended by com.octo.android.robospice.persistence.binary.InFileInputStreamObjectPersister
All Implemented Interfaces:
CacheCleaner, Persister
Direct Known Subclasses:
InFileBigInputStreamObjectPersister

public class InFileInputStreamObjectPersister
extends InFileObjectPersister<InputStream>


Constructor Summary
InFileInputStreamObjectPersister(android.app.Application application)
           
InFileInputStreamObjectPersister(android.app.Application application, File cacheFolder)
           
 
Method Summary
 boolean canHandleClass(Class<?> clazz)
          Whether or not this bus element can persist/unpersist objects of the given class clazz.
protected  InputStream readCacheDataFromFile(File file)
           
 InputStream saveDataToCacheAndReturnData(InputStream 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

InFileInputStreamObjectPersister

public InFileInputStreamObjectPersister(android.app.Application application)
                                 throws CacheCreationException
Throws:
CacheCreationException

InFileInputStreamObjectPersister

public InFileInputStreamObjectPersister(android.app.Application application,
                                        File cacheFolder)
                                 throws CacheCreationException
Throws:
CacheCreationException
Method Detail

readCacheDataFromFile

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

saveDataToCacheAndReturnData

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

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<InputStream>
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.


Copyright © 2012-2014. All Rights Reserved.