Package com.tagtraum.core.cache
Class CompressedFileCache
- java.lang.Object
-
- com.tagtraum.core.cache.FileCache
-
- com.tagtraum.core.cache.CompressedFileCache
-
- All Implemented Interfaces:
Cache
public class CompressedFileCache extends FileCache
FileCache
with gzip compressed entries to preserve disk space.- Author:
- Hendrik Schreiber
-
-
Field Summary
-
Fields inherited from interface com.tagtraum.core.cache.Cache
IGNORE_AGE
-
-
Constructor Summary
Constructors Constructor Description CompressedFileCache()
CompressedFileCache(Path baseDir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InputStream
openInputStream(Path file)
protected OutputStream
openOutputStream(Path file)
-
Methods inherited from class com.tagtraum.core.cache.FileCache
clear, clear, get, getBaseDir, getEntryFileExtension, getNextCache, isCached, put, setBaseDir, setEntryFileExtension, setNextCache
-
-
-
-
Constructor Detail
-
CompressedFileCache
public CompressedFileCache(Path baseDir)
-
CompressedFileCache
public CompressedFileCache()
-
-
Method Detail
-
openInputStream
protected InputStream openInputStream(Path file) throws IOException
- Overrides:
openInputStream
in classFileCache
- Throws:
IOException
-
openOutputStream
protected OutputStream openOutputStream(Path file) throws IOException
- Overrides:
openOutputStream
in classFileCache
- Throws:
IOException
-
-