Hi, I'm starting out and trying to unzip a zip file back to source.
I'm using this code, my source is call "/mnt/sdcard/Out.zip" to output
"/mnt/sdcard/Out.txt" and it seems to work.
Now, if I have many files in Out.zip how do I automatically unzip all
files individually with the correct filename without creating Out.txt
and then write onto it?

---code---
try    {
    File inFolder=new File("/mnt/sdcard/Out.zip");
    BufferedOutputStream out = null;
    ZipInputStream  in = new ZipInputStream(new
BufferedInputStream(new FileInputStream(inFolder)));
    int count;
    byte data[] = new byte[1000];
    out = new BufferedOutputStream(new FileOutputStream("/mnt/sdcard/
Out.txt"),1000);

    while ((count = in.read(data,0,1000)) != -1) {
    out.write(data,0,count);
    }
    out.flush();
    out.close();
}
---code---

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to