|
Build 1.0_r1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.net.ResponseCache
public abstract class ResponseCache
ResponseCache implements URLConnection caches. System default cache can be
registered by invoking ResponseCache.setDefault(ResponseCache),
and can be retrieved by invoking ResponseCache.getDefault.
If URLConnection#useCaches is set, URLConnection class will
use ResponseCache to store and get resources. Whether the
resource is cached depends on ResponseCache implementation. If
a request resource is cached, protocol handler will fecth it from the cache.
If the protocol handler fails to get resource from the cache, it turns to get
the resource from its original location.
| Constructor Summary | |
|---|---|
ResponseCache()
Constructor method. |
|
| Method Summary | |
|---|---|
abstract CacheResponse |
get(URI uri,
String s,
Map map)
|
static ResponseCache |
getDefault()
Gets system default response cache. |
abstract CacheRequest |
put(URI uri,
URLConnection urlconnection)
|
static void |
setDefault(ResponseCache responseCache)
Sets the system default response cache when responseCache is not null. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResponseCache()
| Method Detail |
|---|
public static ResponseCache getDefault()
ResponseCache.
SecurityException - If a security manager is installed and it doesn't have
NetPermission("getResponseCache").public static void setDefault(ResponseCache responseCache)
responseCache - Set default ResponseCache. If responseCache is
null, it unsets the cache.
SecurityException - If a security manager is installed and it doesn't have
NetPermission("setResponseCache").
public abstract CacheResponse get(URI uri,
String s,
Map map)
throws IOException
IOException
public abstract CacheRequest put(URI uri,
URLConnection urlconnection)
throws IOException
IOException
|
Build 1.0_r1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||