class FetchAndUnzipProcess implements GeoServerProcess {

    ZipInputStream getZipFromUrl(String zipUrl, HttpClient client){
        HttpUriRequest req = new HttpGet(zipUrl);
        HttpResponse response;
        ZipInputStream zipStream = null;
        try {
            LOGGER.fine("retrieving zip from: " + zipUrl);
            response = client.execute(req);  // this will call the portal viat the URI which will trigger the jersey TempFileResource search
            StatusLine status = response.getStatusLine();
            int statusCode = status.getStatusCode();
            if (400 <= statusCode) {
                throw new ProcessException("Could not retrieve file '" + zipUrl + "'. Got HTTP " + statusCode);
            } else {
                zipStream = new ZipInputStream(response.getEntity().getContent());
            }
        } catch (IOException ex) {
            throw new ProcessException(ex);
        }
        return zipStream;
    }

}