org.jxmapviewer.cache.LocalCache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jxmapviewer2 Show documentation
Show all versions of jxmapviewer2 Show documentation
A MapViewer based on the JXMapViewer component of SwingX-WS.
package org.jxmapviewer.cache;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
/**
* A cache that stores GET requests to a HTTP url locally
*/
public interface LocalCache {
/**
* @param url the URL request to cache
* @return a (local) stream to use instead or null
.
* @throws IOException if the data cannot be read
*/
InputStream get(URL url) throws IOException;
/**
* @param url the URL request that should be cached
* @param data the input stream that provides the data
* @throws IOException if the data cannot be written
*/
void put(URL url, InputStream data) throws IOException;
}