setDefault ( )源码实例Demo

java.net.ResponseCache#setDefault ( )源码实例Demo

下面列出了java.net.ResponseCache#setDefault ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: android_9.0.0_r45   文件: HttpResponseCache.java
/**
 * Uninstalls the cache and releases any active resources. Stored contents
 * will remain on the filesystem.
 */
@Override public void close() throws IOException {
    if (ResponseCache.getDefault() == this) {
        ResponseCache.setDefault(null);
    }
    delegate.close();
}
 
源代码2 项目: android_9.0.0_r45   文件: HttpResponseCache.java
/**
 * Uninstalls the cache and deletes all of its stored contents.
 */
public void delete() throws IOException {
    if (ResponseCache.getDefault() == this) {
        ResponseCache.setDefault(null);
    }
    delegate.delete();
}
 
源代码3 项目: j2objc   文件: URLConnectionTest.java
@Override protected void tearDown() throws Exception {
    ResponseCache.setDefault(null);
    Authenticator.setDefault(null);
    System.clearProperty("proxyHost");
    System.clearProperty("proxyPort");
    System.clearProperty("http.proxyHost");
    System.clearProperty("http.proxyPort");
    System.clearProperty("https.proxyHost");
    System.clearProperty("https.proxyPort");
    server.shutdown();
    restoreUrlCache(savedUrlCache);
    server = null;
    super.tearDown();
}
 
private void installHttpHandler(long httpCacheSize, File httpCacheDir ){
    try{
        HttpResponseCache result = new HttpResponseCache(httpCacheDir, httpCacheSize);
        ResponseCache.setDefault(result);
        URL.setURLStreamHandlerFactory(new OkHttpURLStreamHandlerFactory(new OkHttpClient()));
    }catch(Exception e){
    	Ln.e(e, "Failed to set up okhttp");
    }
}
 
源代码5 项目: dragonwell8_jdk   文件: TestCache.java
public static void reset() {
    // Set system wide cache handler
    System.out.println("install deploy cache handler");
    ResponseCache.setDefault(new TestCache());
}
 
源代码6 项目: TencentKona-8   文件: TestCache.java
public static void reset() {
    // Set system wide cache handler
    System.out.println("install deploy cache handler");
    ResponseCache.setDefault(new TestCache());
}
 
源代码7 项目: jdk8u60   文件: TestCache.java
public static void reset() {
    // Set system wide cache handler
    System.out.println("install deploy cache handler");
    ResponseCache.setDefault(new TestCache());
}
 
源代码8 项目: openjdk-jdk8u   文件: TestCache.java
public static void reset() {
    // Set system wide cache handler
    System.out.println("install deploy cache handler");
    ResponseCache.setDefault(new TestCache());
}
 
源代码9 项目: openjdk-jdk8u-backup   文件: TestCache.java
public static void reset() {
    // Set system wide cache handler
    System.out.println("install deploy cache handler");
    ResponseCache.setDefault(new TestCache());
}
 
源代码10 项目: openjdk-jdk9   文件: TestCache.java
public static void reset() {
    // Set system wide cache handler
    System.out.println("install deploy cache handler");
    ResponseCache.setDefault(new TestCache());
}
 
源代码11 项目: jdk8u-jdk   文件: TestCache.java
public static void reset() {
    // Set system wide cache handler
    System.out.println("install deploy cache handler");
    ResponseCache.setDefault(new TestCache());
}
 
源代码12 项目: hottub   文件: TestCache.java
public static void reset() {
    // Set system wide cache handler
    System.out.println("install deploy cache handler");
    ResponseCache.setDefault(new TestCache());
}
 
源代码13 项目: openjdk-8-source   文件: TestCache.java
public static void reset() {
    // Set system wide cache handler
    System.out.println("install deploy cache handler");
    ResponseCache.setDefault(new TestCache());
}
 
源代码14 项目: openjdk-8   文件: TestCache.java
public static void reset() {
    // Set system wide cache handler
    System.out.println("install deploy cache handler");
    ResponseCache.setDefault(new TestCache());
}
 
源代码15 项目: jdk8u_jdk   文件: TestCache.java
public static void reset() {
    // Set system wide cache handler
    System.out.println("install deploy cache handler");
    ResponseCache.setDefault(new TestCache());
}
 
源代码16 项目: jdk8u-jdk   文件: TestCache.java
public static void reset() {
    // Set system wide cache handler
    System.out.println("install deploy cache handler");
    ResponseCache.setDefault(new TestCache());
}
 
源代码17 项目: jdk8u-dev-jdk   文件: TestCache.java
public static void reset() {
    // Set system wide cache handler
    System.out.println("install deploy cache handler");
    ResponseCache.setDefault(new TestCache());
}
 
源代码18 项目: libreveris   文件: JnlpResponseCache.java
static void init ()
{
    if (ResponseCache.getDefault() == null) {
        ResponseCache.setDefault(new JnlpResponseCache());
    }
}
 
源代码评论
动弹
沙发等你来抢
 方法所在类