Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

The following Code seems to work fine on API Levels 11 and above:

   private ZipInputStream getFileFromZip(InputStream zipFileStream) throws FileNotFoundException, IOException {
     ZipInputStream zis = new ZipInputStream(zipFileStream);
     ZipEntry ze = null;
     while ((ze = zis.getNextEntry()) != null) {
       Log.w(ACTIVITY_LOG_TAG, "extracting file: '" + ze.getName() + "'...");
       return zis;
     }
     return null;
    }

But throws an IOExceptionwhen running under, e.g. 10 or 8. I want to support those APIs as well in my app, so I need to bring this to work...

I checked all the filenames, paths etc. And again, under 3.0 it works. I also am using actionbarsherlock, although that should not impact the zip Input stream.

Does anyone have any ideas???

share|improve this question
can you post the complete logcat? The snippet you provide should run indifferently on all the android version – blackbelt 32 mins ago

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.