tags:

views:

56

answers:

1

I need to download a zip file and unpack it, in the background (in an AsyncTask I'd imagine).

As it is now, I've got a DefaultHTTPClient set up, and a ZipInputStream ready to go, but here's where I am stuck - I have no idea how to use these two together. Here's the relevant code in the AsyncTask:

DefaultHttpClient http = new DefaultHttpClient();

        HttpGet method = new HttpGet("http://tf2b.com/downloads/imgshugo.zip");
        //method.addHeader("Accept-Encoding", "gzip");
        HttpResponse res = http.execute(method);

        InputStream is = res.getEntity().getContent();
        ZipInputStream zip = new ZipInputStream(is);

The last line there I'm not sure about at all, even. Any help would be appreciated!

A: 

http://www.exampledepot.com/search/luceneapi_node/zip

Peter Knego
This helped me immensely. It works! Thanks a lot.
Hideous