1 /*
2  * Copyright (C) 2014 Square, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package com.squareup.okhttp;
17 
18 import java.io.IOException;
19 import java.net.CacheRequest;
20 import java.net.CacheResponse;
21 import java.net.ResponseCache;
22 import java.net.URI;
23 import java.net.URISyntaxException;
24 import java.net.URL;
25 import java.net.URLConnection;
26 import java.util.List;
27 import java.util.Map;
28 
29 public class AbstractResponseCache extends ResponseCache {
get(URI uri, String requestMethod, Map<String, List<String>> requestHeaders)30   @Override public CacheResponse get(URI uri, String requestMethod,
31       Map<String, List<String>> requestHeaders) throws IOException {
32     return null;
33   }
34 
put(URI uri, URLConnection connection)35   @Override public CacheRequest put(URI uri, URLConnection connection) throws IOException {
36     return null;
37   }
38 
toUri(URL serverUrl)39   public static URI toUri(URL serverUrl) {
40     try {
41       return serverUrl.toURI();
42     } catch (URISyntaxException e) {
43       throw new AssertionError(e);
44     }
45   }
46 }
47