Package org.jxmapviewer.cache
Interface LocalCache
- All Known Implementing Classes:
FileBasedLocalCache,NoOpLocalCache
public interface LocalCache
A cache that stores GET requests to a HTTP url locally
-
Method Details
-
get
java.io.InputStream get(java.net.URL url) throws java.io.IOException- Parameters:
url- the URL request to cache- Returns:
- a (local) stream to use instead or
null. - Throws:
java.io.IOException- if the data cannot be read
-
put
void put(java.net.URL url, java.io.InputStream data) throws java.io.IOException- Parameters:
url- the URL request that should be cacheddata- the input stream that provides the data- Throws:
java.io.IOException- if the data cannot be written
-