Package de.mhus.lib.core.io
Class ContentCache
- java.lang.Object
-
- de.mhus.lib.core.MLog
-
- de.mhus.lib.core.lang.MObject
-
- de.mhus.lib.core.io.ContentCache
-
- All Implemented Interfaces:
ILog,MNlsProvider,Nls
public class ContentCache extends MObject
TODO implement save write / read mechanism- Author:
- mikehummel
-
-
Constructor Summary
Constructors Constructor Description ContentCache(ResourceNode config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStreamcacheAndReturn(String id, InputStream is)voiddoCache(String id, InputStream is)InputStreamgetCached(String id)booleanisCached(String id)
-
-
-
Constructor Detail
-
ContentCache
public ContentCache(ResourceNode config) throws de.mhus.lib.errors.MException
- Throws:
de.mhus.lib.errors.MException
-
-
Method Detail
-
isCached
public boolean isCached(String id)
-
cacheAndReturn
public InputStream cacheAndReturn(String id, InputStream is) throws IOException
- Throws:
IOException
-
doCache
public void doCache(String id, InputStream is) throws IOException
- Throws:
IOException
-
getCached
public InputStream getCached(String id) throws FileNotFoundException
- Throws:
FileNotFoundException
-
-