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 */
16package com.squareup.okhttp;
17
18import java.io.IOException;
19import java.net.CacheRequest;
20import java.net.CacheResponse;
21import java.net.ResponseCache;
22import java.net.URI;
23import java.net.URISyntaxException;
24import java.net.URL;
25import java.net.URLConnection;
26import java.util.List;
27import java.util.Map;
28
29public class AbstractResponseCache extends ResponseCache {
30  @Override public CacheResponse get(URI uri, String requestMethod,
31      Map<String, List<String>> requestHeaders) throws IOException {
32    return null;
33  }
34
35  @Override public CacheRequest put(URI uri, URLConnection connection) throws IOException {
36    return null;
37  }
38
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