public class LocalResponseCache extends ResponseCache
Modifier and Type | Method and Description |
---|---|
CacheResponse |
get(URI uri,
String rqstMethod,
Map<String,List<String>> rqstHeaders) |
File |
getLocalFile(URI remoteUri)
Returns the local File corresponding to the given remote URI.
|
static void |
installResponseCache(String baseURL,
File cacheDir,
boolean checkForUpdates)
Sets this cache as default response cache
|
CacheRequest |
put(URI uri,
URLConnection conn) |
getDefault, setDefault
public static void installResponseCache(String baseURL, File cacheDir, boolean checkForUpdates)
baseURL
- the URL, the caching should be restricted to or null
for nonecacheDir
- the cache directorycheckForUpdates
- true if the URL is queried for newer versions of a file firstpublic File getLocalFile(URI remoteUri)
remoteUri
- the remote URIpublic CacheResponse get(URI uri, String rqstMethod, Map<String,List<String>> rqstHeaders) throws IOException
get
in class ResponseCache
IOException
public CacheRequest put(URI uri, URLConnection conn) throws IOException
put
in class ResponseCache
IOException
Copyright © 2013. All Rights Reserved.