// Path: ignition-support/ignition-support-lib/src/main/java/com/github/ignition/support/http/cache/CachedHttpResponse.java
// public static final class ResponseData {
//     public ResponseData(int statusCode, byte[] responseBody) {
//         this.statusCode = statusCode;
//         this.responseBody = responseBody;
//     }
// 
//     private int statusCode;
//     private byte[] responseBody;
// 
//     public int getStatusCode() {
//         return statusCode;
//     }
// 
//     public byte[] getResponseBody() {
//         return responseBody;
//     }
// }


import android.util.Log;
import com.github.ignition.support.http.cache.CachedHttpResponse.ResponseData;
import com.github.ignition.support.http.cache.HttpResponseCache;
import java.io.IOException;
import java.net.ConnectException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpResponseException;
import org.apache.http.client.ResponseHandler;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.impl.client.AbstractHttpClient;
import org.apache.http.params.CoreConnectionPNames;
import org.apache.http.protocol.BasicHttpContext;
import org.apache.http.protocol.HttpContext;
                    ignitedHttp.setConnectionTimeout(oldConnTimeout);
                    ignitedHttp.setSocketTimeout(oldSocketTimeout);
                }
            }
        }

        // no retries left, crap out with exception
        ConnectException ex = new ConnectException();
        ex.initCause(cause);
        throw ex;
    }

    private boolean retryRequest(IgnitedHttpRequestRetryHandler retryHandler, IOException cause,
            HttpContext context) {
        Log.e(IgnitedHttp.LOG_TAG, "Intercepting exception that wasn't handled by HttpClient");
        executionCount = Math.max(executionCount, retryHandler.getTimesRetried());
        return retryHandler.retryRequest(cause, ++executionCount, context);
    }

    @Override
    public IgnitedHttpResponse handleResponse(HttpResponse response) throws IOException {
        int status = response.getStatusLine().getStatusCode();
        if (expectedStatusCodes != null && !expectedStatusCodes.isEmpty()
                && !expectedStatusCodes.contains(status)) {
            throw new HttpResponseException(status, "Unexpected status code: " + status);
        }

        IgnitedHttpResponse bhttpr = new IgnitedHttpResponseImpl(response);
        HttpResponseCache responseCache = ignitedHttp.getResponseCache();
        if (responseCache != null && bhttpr.getResponseBody() != null) {
// Path: ignition-support/ignition-support-lib/src/main/java/com/github/ignition/support/http/cache/CachedHttpResponse.java
// public static final class ResponseData {
//     public ResponseData(int statusCode, byte[] responseBody) {
//         this.statusCode = statusCode;
//         this.responseBody = responseBody;
//     }
// 
//     private int statusCode;
//     private byte[] responseBody;
// 
//     public int getStatusCode() {
//         return statusCode;
//     }
// 
//     public byte[] getResponseBody() {
//         return responseBody;
//     }
// }


// Path: ignition-support/ignition-support-lib/src/main/java/com/github/ignition/support/http/IgnitedHttpRequestBase.java
import android.util.Log;
import com.github.ignition.support.http.cache.CachedHttpResponse.ResponseData;
import com.github.ignition.support.http.cache.HttpResponseCache;
import java.io.IOException;
import java.net.ConnectException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpResponseException;
import org.apache.http.client.ResponseHandler;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.impl.client.AbstractHttpClient;
import org.apache.http.params.CoreConnectionPNames;
import org.apache.http.protocol.BasicHttpContext;
import org.apache.http.protocol.HttpContext;

                    ignitedHttp.setConnectionTimeout(oldConnTimeout);
                    ignitedHttp.setSocketTimeout(oldSocketTimeout);
                }
            }
        }

        // no retries left, crap out with exception
        ConnectException ex = new ConnectException();
        ex.initCause(cause);
        throw ex;
    }

    private boolean retryRequest(IgnitedHttpRequestRetryHandler retryHandler, IOException cause,
            HttpContext context) {
        Log.e(IgnitedHttp.LOG_TAG, "Intercepting exception that wasn't handled by HttpClient");
        executionCount = Math.max(executionCount, retryHandler.getTimesRetried());
        return retryHandler.retryRequest(cause, ++executionCount, context);
    }

    @Override
    public IgnitedHttpResponse handleResponse(HttpResponse response) throws IOException {
        int status = response.getStatusLine().getStatusCode();
        if (expectedStatusCodes != null && !expectedStatusCodes.isEmpty()
                && !expectedStatusCodes.contains(status)) {
            throw new HttpResponseException(status, "Unexpected status code: " + status);
        }

        IgnitedHttpResponse bhttpr = new IgnitedHttpResponseImpl(response);
        HttpResponseCache responseCache = ignitedHttp.getResponseCache();
        if (responseCache != null && bhttpr.getResponseBody() != null) {
            ResponseData responseData = new ResponseData(status, bhttpr.getResponseBodyAsBytes());