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);
开发者_如何学PythonThe last line there I'm not sure about at all, even. Any help would be appreciated!
http://www.exampledepot.com/search/luceneapi_node/zip
精彩评论