// Path: retrofitcachelibrx2/src/main/java/ren/yale/android/retrofitcachelibrx2/util/LogUtil.java
// public class LogUtil {
//    private static String TAG="retrofitcache";
//     private static final  boolean DEBUG = false;
//     public static void d(String text){
//             android.util.Log.d(TAG,text);
//     }
//     public static void w(String text){
//         android.util.Log.w(TAG,text);
//     }
// 
//     public static void l(Exception e){
//         if (DEBUG){
//            e.printStackTrace();
//         }else{
//             android.util.Log.w(TAG,e.toString());
//         }
//     }
// }


import java.io.IOException;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;
import ren.yale.android.retrofitcachelibrx2.util.LogUtil;
package ren.yale.android.retrofitcachelibrx2.intercept;



/**
 * Created by yale on 2019/7/24.
 */
public class MockInterceptor extends BaseInterceptor implements Interceptor {


    @Override
    public Response intercept(Chain chain) throws IOException {
        Request request = chain.request();
        Response  mockResponse = mockResponse(chain);
        if (mockResponse!=null){
            return mockResponse;
        }
        String mockUrl = mockUrl(chain);
        if (mockUrl!=null){
// Path: retrofitcachelibrx2/src/main/java/ren/yale/android/retrofitcachelibrx2/util/LogUtil.java
// public class LogUtil {
//    private static String TAG="retrofitcache";
//     private static final  boolean DEBUG = false;
//     public static void d(String text){
//             android.util.Log.d(TAG,text);
//     }
//     public static void w(String text){
//         android.util.Log.w(TAG,text);
//     }
// 
//     public static void l(Exception e){
//         if (DEBUG){
//            e.printStackTrace();
//         }else{
//             android.util.Log.w(TAG,e.toString());
//         }
//     }
// }


// Path: retrofitcachelibrx2/src/main/java/ren/yale/android/retrofitcachelibrx2/intercept/MockInterceptor.java
import java.io.IOException;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;
import ren.yale.android.retrofitcachelibrx2.util.LogUtil;

package ren.yale.android.retrofitcachelibrx2.intercept;



/**
 * Created by yale on 2019/7/24.
 */
public class MockInterceptor extends BaseInterceptor implements Interceptor {


    @Override
    public Response intercept(Chain chain) throws IOException {
        Request request = chain.request();
        Response  mockResponse = mockResponse(chain);
        if (mockResponse!=null){
            return mockResponse;
        }
        String mockUrl = mockUrl(chain);
        if (mockUrl!=null){
            LogUtil.d("get data from mock url: "+mockUrl);