Package com.mchange.v3.filecache
Class FileCache
- java.lang.Object
-
- com.mchange.v3.filecache.FileCache
-
public final class FileCache extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description FileCache(java.io.File cacheDir, int buffer_size, boolean read_only)
FileCache(java.io.File cacheDir, int buffer_size, boolean read_only, URLFetcher... fetchers)
FileCache(java.io.File cacheDir, int buffer_size, boolean read_only, java.util.List<URLFetcher> fetchers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
countCached()
int
countCached(java.io.FileFilter filter)
void
ensureCached(FileCacheKey key, boolean force_reacquire)
java.io.InputStream
fetch(FileCacheKey key, boolean force_reacquire)
java.io.File
fileForKey(FileCacheKey key)
boolean
isCached(FileCacheKey key)
-
-
-
Constructor Detail
-
FileCache
public FileCache(java.io.File cacheDir, int buffer_size, boolean read_only) throws java.io.IOException
- Throws:
java.io.IOException
-
FileCache
public FileCache(java.io.File cacheDir, int buffer_size, boolean read_only, URLFetcher... fetchers) throws java.io.IOException
- Throws:
java.io.IOException
-
FileCache
public FileCache(java.io.File cacheDir, int buffer_size, boolean read_only, java.util.List<URLFetcher> fetchers) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
ensureCached
public void ensureCached(FileCacheKey key, boolean force_reacquire) throws java.io.IOException
- Throws:
java.io.IOException
-
fetch
public java.io.InputStream fetch(FileCacheKey key, boolean force_reacquire) throws java.io.IOException
- Throws:
java.io.IOException
-
isCached
public boolean isCached(FileCacheKey key) throws java.io.IOException
- Throws:
java.io.IOException
-
countCached
public int countCached() throws java.io.IOException
- Throws:
java.io.IOException
-
countCached
public int countCached(java.io.FileFilter filter) throws java.io.IOException
- Throws:
java.io.IOException
-
fileForKey
public java.io.File fileForKey(FileCacheKey key)
-
-