Need help?

I'm available for remote short term contracting or consultancy work. Please check out my LinkedIn profile for more details on my experience.

Please feel free to use the form below to contact me.




Unzipping Files with Android (Programmatically)

I wrote an article a few months ago, which walked you through the process of zipping files programmatically with Java - in an Android environment. Due to popular demand, I've decided to write up another article on how to unzip files.

The process is pretty similar, and you could probably combine them both in a single class, but for this example, I made a class called Decompress.


import android.util.Log;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;

/**
 *
 * @author jon
 */
public class Decompress {
  private String _zipFile;
  private String _location;

  public Decompress(String zipFile, String location) {
    _zipFile = zipFile;
    _location = location;

    _dirChecker("");
  }

  public void unzip() {
    try  {
      FileInputStream fin = new FileInputStream(_zipFile);
      ZipInputStream zin = new ZipInputStream(fin);
      ZipEntry ze = null;
      while ((ze = zin.getNextEntry()) != null) {
        Log.v("Decompress", "Unzipping " + ze.getName());

        if(ze.isDirectory()) {
          _dirChecker(ze.getName());
        } else {
          FileOutputStream fout = new FileOutputStream(_location + ze.getName());
          for (int c = zin.read(); c != -1; c = zin.read()) {
            fout.write(c);
          }

          zin.closeEntry();
          fout.close();
        }
        
      }
      zin.close();
    } catch(Exception e) {
      Log.e("Decompress", "unzip", e);
    }

  }

  private void _dirChecker(String dir) {
    File f = new File(_location + dir);

    if(!f.isDirectory()) {
      f.mkdirs();
    }
  }
}

Well, that's the class - tested on my Nexus One and works!

Here's an example of how to use it:


String zipFile = Environment.getExternalStorageDirectory() + "/files.zip";
String unzipLocation = Environment.getExternalStorageDirectory() + "/unzipped/";

Decompress d = new Decompress(zipFile, unzipLocation);
d.unzip();

That should unzip files.zip and put the contents into /sdcard/unzipped/, as was specified.

Check out my other article, if you want to find out how to zip files - Zipping Files with Android (Programmatically)


jon | October 27, 2010 | Comments (67)

Comments

Hello! [url=http://www.whatscoupon.com][b]75% Off Website[/b][/url]
[url=http://www.glamour.com][b] Fashion Editor Tips and Tricks For Finding Exactly What You Want Online[/b][/url] Measurements are maxi bags are large though often carried by hand, the lines do not have middle ground, modern, square or round and feminine. The bags are carried by hand or under your arm, point out that even the clutch, except for the small jeweled versions, lengthen the measures appearing flat but at the same time almost spacious.[url=http://www.coachoutletfactorystore.us.com][b]Coach Cross Body Purses[/b][/url] [url=http://www.coachfactoryinc.us.com][b]Coach Factory Outlet[/b][/url] [url=http://www.coachfactoryinc.us.com][b]Coach Outlet Handbags 70% Off[/b][/url] [url=http://www.coachoutletfactorystore.us.com][b]Coach.com Outlet[/b][/url] [url=http://www.coachoutletfactorystore.us.com][b]Coach Outlet[/b][/url] [url=http://www.coachoutletfactorystore.us.com][b]Handbags Bags Purses Outlet Stores -80%Off-[/b][/url] [url=http://www.coachfactoryoutletsells.com][b]Coach Factory Outlet[/b][/url] [url=http://www.coachfactoryoutletsells.com][b]Coach Outlet Store Online[/b][/url] [url=http://www.coachoutletinc.us.com][b]Coach Outlet Store Online[/b][/url] [url=http://www.coachoutletinc.us.com][b]Coach Outlet York Offer[/b][/url] [url=http://www.coachfactoryoutletfriday.com][b]Coach Factory Outlet[/b][/url] [url=http://www.coachfactoryoutletfriday.com][b]Save Big At Coach Outlet Stores[/b][/url] [url=http://www.coachstoresonline.us.com][b]Coach Factory Outlet[/b][/url] [url=http://www.coachstoresonline.us.com][b]Coach Outlet Store Online[/b][/url] [url=http://www.coachoutletusa.us.com][b]Coach Outlet[/b][/url] [url=http://www.coachoutletusa.us.com][b]Coach Outlet USA[/b][/url] [url=http://www.coachfactoryoutletusa.us.com][b]Coach Outlet Online[/b][/url] [url=http://www.coachfactoryoutletusa.us.com][b]Coach Factory Outlet Fall 2014[/b][/url] [url=http://www.coachstoreoutlet.us.com][b]Coach Factory[/b][/url] [url=http://www.coachstoreoutlet.us.com][b]Save Big At Coach Outlet Stores[/b][/url] [url=http://www.coachoutletstores.us.org][b]Coach Outlet[/b][/url] [url=http://www.coachoutletstores.us.org][b]Coach Outlet Online Handbags And Other Designer[/b][/url] [url=http://www.coachfactoryoutletstore.us.com][b]Coach Factory Outlet[/b][/url] [url=http://www.hermesbelts.net][b]Hermes Belt - Hermes Belt Cheap Hermes Birkin Bag Handbags Belts Outlet Stores Online[/b][/url] [url=http://www.hermesbelts.net][b]Hermes Belt For Sale[/b][/url] [url=http://www.valentinoshoes.us.org][b]Valentino Shoes[/b][/url] [url=http://www.coachfactoryoutletstore.us.com][b]Coach Factory Fall 2014[/b][/url] [url=http://www.coachfactorystoreoutlet.us.com][b]Coach Outlet Store Online[/b][/url] [url=http://www.coachfactorystoreoutlet.us.com][b]Coach Outlet[/b][/url] [url=http://www.coachoutletsstoreonline.us.com][b]Coach Outlet Store Online[/b][/url] [url=http://www.coachoutletsstoreonline.us.com][b]Coach Outlet Store bags[/b][/url] [url=http://www.coachstoresoutlet.us.com][b]Coach Outlet[/b][/url] [url=http://www.coachstoresoutlet.us.com][b]Coach Outlet Store Online Fall 2014[/b][/url] [url=http://www.coachoutletstore.us.org][b]Coach Outlet Online[/b][/url] [url=http://www.coachoutletstore.us.org][b]Coach Outlet[/b][/url] [url=http://www.coachoutletonlinesell.com][b]Coach Outlet Online[/b][/url] [b][url=http://www.coachoutletonlinesell.com]Ohio State Strength Coach[/url] [url=http://www.coachstoreonline.us.com]Coach Outlet Store Online[/url][/b] [url=http://www.coachstoreonline.us.com][b]Coach Outlet Store[/b][/url] [url=http://www.coachblackfriday.us.com][b]Coach Black Friday[/b][/url] [url=http://www.coachblackfriday.us.com][b]Coach Black Friday Handbags[/b][/url] [url=http://www.chanelblackfriday.us.com][b]Chanel Black Friday[/b][/url] [url=http://www.chanelblackfriday.us.com][b]Save Up to 80% Off Now! Amazing Offers on Chanel Perfume[/b][/url] [url=http://www.coachblackfriday.us.com][b]Coach Outlet Line Store Coach Shoes, Handbags, Flats, Boots, Flip flops[/b][/url] [url=http://www.kate-spadeoutletonline.com][b]Kate Spade Outlet Online[/b][/url] [url=http://www.kate-spadeoutletonline.com][b]Kate Spade New York Handbags[/b][/url] [url=http://www.katespadehandbags.us.com][b]Kate Spade Handbags[/b][/url] [url=http://www.katespadehandbags.us.com][b]Amaz On Kate Spade Handbags[/b][/url] [url=http://www.katespadeoutlet-online.us.com][b]Kate Spade Outlet Online[/b][/url] [url=http://www.katespadeoutlet-online.us.com][b]Kate Spade Online Shopping[/b][/url] [url=http://www.katespadeblackfriday.com][b]Kate Spade Cyber Monday[/b][/url] [url=http://www.katespadeblackfriday.com][b]Kate Spade Black Friday[/b][/url] [url=http://www.michaelkorsoutlets.us.org][b]Michael Kors Outlet[/b][/url] [url=http://www.michaelkorsoutlets.us.org][b]Michael Kors. Sign In[/b][/url] [url=http://www.michaelkorsoutletsonline.us.org][b]Michael Kors Outlet Online[/b][/url] [url=http://www.michaelkorsoutletsonline.us.org][b]Michael Kors Outlet Store 80 % Off[/b][/url] [url=http://www.michael-korsoutlet.us.org][b]Michael Kors Outlet[/b][/url] [url=http://www.michael-korsoutlet.us.org][b]Michael Kors Outlet Online Or Ln-Store[/b][/url] [url=http://www.michaelkorsoutletonline.us.org][b]Michael Kors Outlet Online[/b][/url] [url=http://www.michaelkorsoutletonline.us.org][b]Michael Kors. Sign In[/b][/url] [url=http://www.michaelkorsblackfridayus.com][b]Michael Kors Black Friday[/b][/url] [url=http://www.michaelkorsblackfridayus.com][b]Black Friday Michaels Ad[/b][/url] [url=http://www.michaelkorsoutletstore.us.org][b]Michael Kors Outlet Store[/b][/url] [url=http://www.michaelkorsoutletstore.us.org][b]Sale Now Save Up To 75% Off[/b][/url] [url=http://www.michaelkors-outlet.us.org][b]Michael Kors Outlet[/b][/url] [url=http://www.michaelkors-outlet.us.org][b]Michael Kors Apparel[/b][/url] [url=http://www.michaelkorsoutletstores.us.org][b]Michael Kors Outlet Stores[/b][/url] [url=http://www.michaelkorsoutletstores.us.org][b]Michael Kors Outlet 49.00[/b][/url] [url=http://www.michaelkorsoutletonlinesale.us.org][b]Michael Kors Outlet Online[/b][/url] [url=http://www.burberryoutlet.com.co][b]Burberry Outlet[/b][/url] [url=http://www.michaelkorsoutletonlinesale.us.org][b]Michael Kors Outlet Online Sale Now Save Up To 68% Off[/b][/url] [url=http://www.michaelkorsoutlet-online.us.org][b]Michael Kors Outlet[/b][/url] [url=http://www.michaelkorsoutlet-online.us.org][b]Michael Kors. Sign In[/b][/url] [url=http://www.louisvuittonoutlet-us.com][b]Louis Vuitton Outlet[/b][/url] [url=http://www.louisvuittonoutlet-us.com][b]Louis Vuitton Outlet Stores[/b][/url] [url=http://www.louisvuittonstores.us.com][b]Louis Vuitton[/b][/url] [url=http://www.burberryhandbags.com.co][b]Burberry Handbags[/b][/url] [url=http://www.louisvuittonstores.us.com][b]Louis Vuitton Store[/b][/url] [url=http://www.louisvuittonoutlet-online.com][b]Louis Vuitton Outlet Online[/b][/url] [url=http://www.louisvuittonoutlet-online.com][b]Louis Vuitton Bags And Purses[/b][/url] [url=http://www.louis-vuittonoutletstores.com][b]Louis Vuitton Outlet Stores[/b][/url] [url=http://www.louis-vuittonoutletstores.com][b]Authentic Louis Vuitton Outlet Store LV Bags[/b][/url] [url=http://www.louisvuittonhandbags.eu.com][b]Louis Vuitton Handbags[/b][/url] [url=http://www.louisvuittonhandbags.eu.com][b]Louis Vuitton malletier[/b][/url] [url=http://www.louisvuitton-blackfriday.com][b]Louis Vuitton Black Friday[/b][/url] [url=http://www.louisvuitton-blackfriday.com][b]Louis Vuitton Outlet Deals[/b][/url] [url=http://www.louisvuittonoutlet.eu.com][b]Louis Vuitton Outlet[/b][/url] [url=http://www.louisvuittonoutlet.eu.com][b]Louis Vuitton Store Malletier[/b][/url] [url=http://www.pradaoutlet.eu.com][b]Prada Outlet[/b][/url] [url=http://www.pradaoutlet.eu.com][b]Prada S.p.A. Is An Italian luxury[/b][/url] [url=http://www.pradahandbags.eu.com][b]Prada Handbags[/b][/url] [url=http://www.pradahandbags.eu.com][b]Prada Handbags at Bluefly[/b][/url] [url=http://www.prada-blackfriday.com][b]Prada Black Friday[/b][/url] [url=http://www.prada-blackfriday.com][b]Cheap Prada Outlet Online Handbags On Clearance[/b][/url] [url=http://www.marcbymarc-jacobs.com][b]Marc By Marc Jacobs[/b][/url] [url=http://www.marcbymarc-jacobs.com][b]Marc Jacobs Handbags[/b][/url] [url=http://www.celine-handbags.com][b]Celine Handbags[/b][/url] [url=http://www.celine-handbags.com][b]Celine Handbags Nordstrom[/b][/url] [url=http://www.celinehandbags.us.com][b]Celine Handbags[/b][/url] [url=http://www.celinehandbags.us.com][b]How Much Are Celine Handbags[/b][/url] [url=http://www.ray-bansunglasses.com][b]Ray Ban Sunglasses[/b][/url] [url=http://www.ray-bansunglasses.com][b]Shop Ray Ban Sunglasses Online[/b][/url] [url=http://www.oakleyglasses.us.com][b]Oakley Sunglasses[/b][/url] [url=http://www.oakleyglasses.us.com][b]Cheap Oakleys Sunglasses Outlet Store USA With High Quality[/b][/url] [url=http://www.thenorthfaceoutlet.com.co][b]The North Face Outlet - The North Face Jacket[/b][/url] [url=http://www.raybansunglasses.eu.com][b]Ray-Ban Sunglasses[/b][/url] [url=http://www.raybansunglasses.eu.com][b]Ray-Ban Is The Global Leader In Premium Eyewear[/b][/url] [url=http://www.raybansunglasses.us.org][b]Ray Ban Sunglasses[/b][/url] [url=http://www.raybansunglasses.us.org][b]Free Overnight Shipping & Returns[/b][/url] [url=http://www.ray-bansunglasses.us.org][b]Ray Ban Sunglasses[/b][/url] [url=http://www.ray-bansunglasses.us.org][b]Ray Ban Your Online Sunglasses Store[/b][/url] [url=http://www.ray-banblackfriday.com][b]Ray Ban Black Friday[/b][/url] [url=http://www.ray-banblackfriday.com][b]Ray Ban Black And Red[/b][/url] [url=http://www.oakleysunglasses.eu.com][b]Oakley Sunglasses[/b][/url] [url=http://www.oakleysunglasses.eu.com][b]Oakley Sunglasses[/b] [b]Including Holbrook[/b][/url] [url=http://www.oakleysunglasses.com.co][b]Oakley Sunglasses[/b][/url] [url=http://www.oakleysunglasses.com.co][b]Oakley Sunglasses Outlet Up To[/b][/url] [url=http://www.oakleyvault.in.net][b]Oakley Vault[/b][/url] [url=http://www.oakleyvault.in.net][b]Oakley Creates Free[/b][/url] [url=http://www.oakleyblackfriday.com][b]Oakley Black Friday[/b][/url] [url=http://www.oakleyblackfriday.com][b]100% Authentic Oakley Sale Black Friday And The Discount[/b][/url] [url=http://www.tomsoutlet.in.net][b]Toms Outlet[/b][/url] [url=http://www.tomsoutlet.in.net][b]Toms Outlet Shoes[/b][/url] [url=http://www.hollisterclothing-store.com][b]Hollister Clothing Store[/b][/url] [url=http://www.hollisterclothing-store.com][b]Hollister Clothing[/b][/url] [url=http://www.abercrombieandfitch.com.co][b]Abercrombie And fitch[/b][/url] [url=http://www.abercrombieandfitch.com.co][b]Abercrombie 75% Off Coup On[/b][/url] [url=http://www.abercrombieandfitch.eu.com][b]Abercrombie And Fitch[/b][/url] [url=http://www.abercrombieandfitch.eu.com][b]Off 80% On Premium Eyewear Abercrombie[/b][/url] [url=http://www.abercrombieblackfriday.us.com][b]Abercrombie Black Friday[/b][/url] [url=http://www.abercrombieblackfriday.us.com][b]Abercrombie Black People[/b][/url] [url=http://www.ralphlaurenpolo.us.com][b]Polo Ralph Lauren[/b][/url] [url=http://www.ralphlaurenpolo.us.com][b]Ralph Lauren Outlet[/b][/url] [url=http://www.ralphlaurenoutletonline.us.com][b]Polo Ralph Lauren Outlet Online[/b][/url] [url=http://www.ralphlaurenoutletonline.us.com][b]Ralph Lauren Clearance Outlet[/b][/url] [url=http://www.toryburchoutletstore.com][b]Tory Burch Outlet[/b][/url] [url=http://www.toryburchoutletstore.com][b]Tory Burch Outlet Store[/b][/url] [url=http://www.toryburchshoes.in.net][b]Tory Burch Shoes[/b][/url] [url=http://www.toryburchshoes.in.net][b]Tory Burch Outlet Online Discount Price[/b][/url] [url=http://www.toryburchoutletstore.us.com][b]Tory Burch Outlet[/b][/url] [url=http://www.toryburchoutletstore.us.com][b]Discount Tory Burch Shoes[/b][/url] [url=http://www.toryburchblackfriday.com][b]Tory Burch Black Friday[/b][/url] [url=http://www.toryburchblackfriday.com][b]Tory Burch Black Wedge[/b][/url] [url=http://www.nikeairjordan.eu.com][b]Nike Air Jordan[/b][/url] [url=http://www.nikeairjordan.eu.com][b]All Michael Jordan Shoes[/b][/url] [url=http://www.valentino.us.com][b]Valentino[/b][/url] [url=http://www.valentino.us.com][b]valentino.com[/b][/url] [url=http://www.tomsshoesoutletonline.in.net][b]Toms Shoes Outlet Online[/b][/url] [url=http://www.tomsshoesoutletonline.in.net][b]Toms Outlet[/b][/url] [url=http://www.supra.us.com][b]Supra Shoes[/b][/url] [url=http://www.supra.us.com][b]supra.com[/b][/url] [url=http://www.truereligion-jeans.com][b]True Religion[/b][/url] [url=http://www.truereligion-jeans.com][b]True Religion Outlet[/b][/url] [url=http://www.truereligion-blackfriday.com][b]True Religion Black Friday[/b][/url] [url=http://www.truereligion-blackfriday.com][b]Black True Religion Jeans Women[/b][/url] [url=http://www.truereligion.us.org][b]True Religion Jeans[/b][/url] [url=http://www.truereligion.us.org][b]True Religion Outlet[/b][/url] [url=http://www.truereligionjeans.us.org][b]True Religion jeans[/b][/url] [url=http://www.truereligionjeans.us.org][b]True Religion Clothing Store[/b][/url] [url=http://www.tiffanyblackfriday.us.com][b]Tiffany Black Friday[/b][/url] [url=http://www.tiffanyblackfriday.us.com][b]Tiffany Cyber Monday Deals[/b][/url] [url=http://www.freywillejewellery.com][b]Frey Wille Jewellery[/b][/url] [url=http://www.freywillejewellery.com][b]Frey Wille Jewellery Prices[/b][/url] [url=http://www.saclongchampfr.org][b]Sac Longchamp[/b][/url] [url=http://www.saclongchampfr.org][b]Sac Longchamps Paris[/b][/url] [url=http://www.redbottomshoe.us.com][b]Red Bottom Shoes[/b][/url] [url=http://www.redbottomshoe.us.com][b]Red Bottom Shoes Shop For And Buy Red Bottom Shoes Online[/b][/url] [url=http://www.redbottomshoes.us.org][b]Red Bottom Shoes[/b][/url] [url=http://www.redbottomshoes.us.org][b]Red Bottom Shoes Save Up To[/b][/url] [url=http://www.timberlandshoes.in.net][b]timberland Shoes[/b][/url] [url=http://www.timberlandshoes.in.net][b]Off 70% Outlet[/b][/url] [url=http://www.ralphlaurenblackfriday.com][b]Ralph Lauren Black Friday[/b][/url] [url=http://www.ralphlaurenblackfriday.com][b]The Latest Ralph Lauren Apparel, Accessories[/b][/url] [url=http://www.michaelkorsoutletsstore.us.com][b]Michael Kors Outlet Store[/b][/url] [url=http://www.michaelkorsoutletsstore.us.com][b]Michael Kors Outlet[/b][/url] [url=http://www.coachfactorystore.cc][b]Coach Factory Store[/b][/url] [url=http://www.coachfactorystore.cc][b]Coach Wallets for Women[/b][/url] [url=http://www.chaneloutletonline.cc][b]Chanel Outlet Online[/b][/url] [url=http://www.chaneloutletonline.cc][b]Chanel Factory Outlet Store Online[/b][/url] [url=http://www.chanelhandbag.cc][b]Chanel Handbags[/b][/url] [url=http://www.chanelhandbag.cc][b]Authentic Cheap Chanel Handbags[/b][/url] [url=http://www.chanelcoco.cc][b]CoCo Chanel[/b][/url] [url=http://www.chanelcoco.cc][b]Chanel Perfume Mademoiselle 50% Off[/b][/url] [url=http://www.chaneloutlet.com.co][b]Chanel Handbags[/b][/url] [url=http://www.chaneloutlet.com.co][b]Chanel Oultet[/b][/url] [url=http://www.andtiffanyco.com][b]Tiffany and co[/b][/url] [url=http://www.tiffanyandcojewelry.in.net][b]Tiffany and co jewelry[/b][/url] [url=http://www.tiffanyandcojewelry.in.net][b]Tiffany and co[/b][/url] [url=http://www.giuseppezanottishoe.com][b]Giuseppe Zanotti Shoes[/b][/url] [url=http://www.cocochanel.com.co][b]Coco Chanel Handbags - Coco Chanel Outlet- Chanel Bags[/b][/url] [url=http://www.chanelhandbags.com.co][b]Chanel Handbags - Chanel Bags - Chanel Outlet Store[/b][/url] [url=http://www.hermesbag.com.co][b]Birkin Hermes Bag -Hermes Bag[/b][/url] [url=http://www.burberryoutlet.com.co][b]Burberry Handbags Outlet Store online[/b][/url] [url=http://www.burberryhandbags.com.co][b]Burberry Handbags Outlet At Prices Up To 70% Off[/b][/url] [url=http://www.thenorthfacestores.org][b]The North Face - The North Face Outlet Store Online[/b][/url] Bold clutches, modern backpacks, embellished totes: This season was all about a statement accessory. Here, all the best, busiest bags we want to grab onto.
Comment by Michael Kors Outlet - December 18, 2014 @ 5:30 am
Hello! 75% Off Website
Fashion Editor Tips and Tricks For Finding Exactly What You Want Online Measurements are maxi bags are large though often carried by hand, the lines do not have middle ground, modern, square or round and feminine. The bags are carried by hand or under your arm, point out that even the clutch, except for the small jeweled versions, lengthen the measures appearing flat but at the same time almost spacious.Coach Cross Body Purses Coach Factory Outlet Coach Outlet Handbags 70% Off Coach.com Outlet Coach Outlet Handbags Bags Purses Outlet Stores -80%Off- Coach Factory Outlet Coach Outlet Store Online Coach Outlet Store Online Coach Outlet York Offer Coach Factory Outlet Save Big At Coach Outlet Stores Coach Factory Outlet Coach Outlet Store Online Coach Outlet Coach Outlet USA Coach Outlet Online Coach Factory Outlet Fall 2014 Coach Factory Save Big At Coach Outlet Stores Coach Outlet Coach Outlet Online Handbags And Other Designer Coach Factory Outlet Hermes Belt - Hermes Belt Cheap Hermes Birkin Bag Handbags Belts Outlet Stores Online Hermes Belt For Sale Valentino Shoes Coach Factory Fall 2014 Coach Outlet Store Online Coach Outlet Coach Outlet Store Online Coach Outlet Store bags Coach Outlet Coach Outlet Store Online Fall 2014 Coach Outlet Online Coach Outlet Coach Outlet Online Ohio State Strength Coach Coach Outlet Store Online Coach Outlet Store Coach Black Friday Coach Black Friday Handbags Chanel Black Friday Save Up to 80% Off Now! Amazing Offers on Chanel Perfume Coach Outlet Line Store Coach Shoes, Handbags, Flats, Boots, Flip flops Kate Spade Outlet Online Kate Spade New York Handbags Kate Spade Handbags Amaz On Kate Spade Handbags Kate Spade Outlet Online Kate Spade Online Shopping Kate Spade Cyber Monday Kate Spade Black Friday Michael Kors Outlet Michael Kors. Sign In Michael Kors Outlet Online Michael Kors Outlet Store 80 % Off Michael Kors Outlet Michael Kors Outlet Online Or Ln-Store Michael Kors Outlet Online Michael Kors. Sign In Michael Kors Black Friday Black Friday Michaels Ad Michael Kors Outlet Store Sale Now Save Up To 75% Off Michael Kors Outlet Michael Kors Apparel Michael Kors Outlet Stores Michael Kors Outlet 49.00 Michael Kors Outlet Online Burberry Outlet Michael Kors Outlet Online Sale Now Save Up To 68% Off Michael Kors Outlet Michael Kors. Sign In Louis Vuitton Outlet Louis Vuitton Outlet Stores Louis Vuitton Burberry Handbags Louis Vuitton Store Louis Vuitton Outlet Online Louis Vuitton Bags And Purses Louis Vuitton Outlet Stores Authentic Louis Vuitton Outlet Store LV Bags Louis Vuitton Handbags Louis Vuitton malletier Louis Vuitton Black Friday Louis Vuitton Outlet Deals Louis Vuitton Outlet Louis Vuitton Store Malletier Prada Outlet Prada S.p.A. Is An Italian luxury Prada Handbags Prada Handbags at Bluefly Prada Black Friday Cheap Prada Outlet Online Handbags On Clearance Marc By Marc Jacobs Marc Jacobs Handbags Celine Handbags Celine Handbags Nordstrom Celine Handbags How Much Are Celine Handbags Ray Ban Sunglasses Shop Ray Ban Sunglasses Online Oakley Sunglasses Cheap Oakleys Sunglasses Outlet Store USA With High Quality The North Face Outlet - The North Face Jacket Ray-Ban Sunglasses Ray-Ban Is The Global Leader In Premium Eyewear Ray Ban Sunglasses Free Overnight Shipping & Returns Ray Ban Sunglasses Ray Ban Your Online Sunglasses Store Ray Ban Black Friday Ray Ban Black And Red Oakley Sunglasses Oakley Sunglasses Including Holbrook Oakley Sunglasses Oakley Sunglasses Outlet Up To Oakley Vault Oakley Creates Free Oakley Black Friday 100% Authentic Oakley Sale Black Friday And The Discount Toms Outlet Toms Outlet Shoes Hollister Clothing Store Hollister Clothing Abercrombie And fitch Abercrombie 75% Off Coup On Abercrombie And Fitch Off 80% On Premium Eyewear Abercrombie Abercrombie Black Friday Abercrombie Black People Polo Ralph Lauren Ralph Lauren Outlet Polo Ralph Lauren Outlet Online Ralph Lauren Clearance Outlet Tory Burch Outlet Tory Burch Outlet Store Tory Burch Shoes Tory Burch Outlet Online Discount Price Tory Burch Outlet Discount Tory Burch Shoes Tory Burch Black Friday Tory Burch Black Wedge Nike Air Jordan All Michael Jordan Shoes Valentino valentino.com Toms Shoes Outlet Online Toms Outlet Supra Shoes supra.com True Religion True Religion Outlet True Religion Black Friday Black True Religion Jeans Women True Religion Jeans True Religion Outlet True Religion jeans True Religion Clothing Store Tiffany Black Friday Tiffany Cyber Monday Deals Frey Wille Jewellery Frey Wille Jewellery Prices Sac Longchamp Sac Longchamps Paris Red Bottom Shoes Red Bottom Shoes Shop For And Buy Red Bottom Shoes Online Red Bottom Shoes Red Bottom Shoes Save Up To timberland Shoes Off 70% Outlet Ralph Lauren Black Friday The Latest Ralph Lauren Apparel, Accessories Michael Kors Outlet Store Michael Kors Outlet Coach Factory Store Coach Wallets for Women Chanel Outlet Online Chanel Factory Outlet Store Online Chanel Handbags Authentic Cheap Chanel Handbags CoCo Chanel Chanel Perfume Mademoiselle 50% Off Chanel Handbags Chanel Oultet Tiffany and co Tiffany and co jewelry Tiffany and co Giuseppe Zanotti Shoes Coco Chanel Handbags - Coco Chanel Outlet- Chanel Bags Chanel Handbags - Chanel Bags - Chanel Outlet Store Birkin Hermes Bag -Hermes Bag Burberry Handbags Outlet Store online Burberry Handbags Outlet At Prices Up To 70% Off The North Face - The North Face Outlet Store Online Bold clutches, modern backpacks, embellished totes: This season was all about a statement accessory. Here, all the best, busiest bags we want to grab onto.
Comment by Michael Kors Outlet - December 18, 2014 @ 5:29 am
A huge sturdy body builder that has a creepy fashioned human body for weight training?
Save time by duplicating an entirely full week that repeat with your method. Minimal bastard held tweeting, but we made it possible to close it without listen to it. I think about that price now once i was taking into consideration my nutritionary possibilities, plus it designed a variation. Will spgs from your two parts of meaning perception and do it yourself-desire.
For, look at, i've got processed thee, i have preferred thee in the central heater of malady. When you loved this information and you want to receive more info about treadmill reviews kindly visit the website.| http://findyourtreadmill.com
Comment by Nicole - December 03, 2014 @ 7:30 pm
You have awesome info at this point. If you liked this information and you would certainly like to get additional details concerning treadmill reviews kindly visit our web site.| http://findyourtreadmill.com
Comment by Leo - December 02, 2014 @ 1:24 am
Wow because this is excellent job! Congrats and keep it up. If you adored this post and you would like to get additional info pertaining to freemotion 775 interactive treadmill reviews kindly visit our site.| http://findyourtreadmill.com
Comment by Shauna - November 27, 2014 @ 1:17 pm
https://issuu.com/reviewer192
Comment by Good day! This is kind of off topic but I need some advice from an established blog. Is it tough to - October 13, 2014 @ 4:37 pm
http://www.halfpriceshows.com
Comment by While at the Luxor we saw Fantasy, Luxor's racy topless revue show. - September 24, 2014 @ 7:40 am
http://www.privacyplants.net
Comment by Stan - September 17, 2014 @ 3:04 am
http://area-date-finder.info/mommy_phone_sex.html
Comment by Alta - September 02, 2014 @ 12:46 pm
http://moni.jd-app.com/Internet_Creating_Is_The_Art_Of_Expert_Internet_Designer
Comment by Katharina - September 02, 2014 @ 11:28 am
http://home.d1sj.com/space.php?uid=54329&do=blog&id=198220
Comment by Erwin - September 02, 2014 @ 11:10 am
http://floridahealthnews.com/921/day-businesses-required-websites/
Comment by Adriana - September 02, 2014 @ 11:06 am
http://www.systems-biology.org/~myukiko/FCSB2008/doku.php?id=tech_design_with_idea
Comment by Taren - September 02, 2014 @ 9:24 am
http://bbs.eaw.com.cn/home/space.php?uid=&do=blog&id=
Comment by Jess - September 02, 2014 @ 3:55 am
http://herptube.com/groups/why-flat-and-thin-are-in/
Comment by Arnulfo - September 02, 2014 @ 2:56 am
http://www.jonasmohr.de/node/81264
Comment by Monroe - September 02, 2014 @ 1:42 am
http://help.ksu.edu.sa/node/70848
Comment by Anke - September 02, 2014 @ 1:03 am
http://forexvps24.com/?page_id=522
Comment by Hassie - September 01, 2014 @ 10:47 pm
http://www.inter-wife.com/
Comment by Twyla - September 01, 2014 @ 4:09 pm
http://www.vouchercodecrazy.co.uk/bhsfurniture.co.uk/
Comment by Geraldine - September 01, 2014 @ 10:09 am
http://www.howtoreducefatfromface.net
Comment by Deloras - August 16, 2014 @ 9:17 pm
http://www.howtoreducepimplestoday.com
Comment by Arlene - August 14, 2014 @ 4:10 pm
http://tibari.de/index.php?section=gallery&cid=7&pId=186
Comment by Jorge - August 09, 2014 @ 10:02 am
Thanks a lot Jon
Comment by Ashish - August 09, 2014 @ 4:22 am
http://makeupbaby.com/profile/vileech
Comment by Theda - July 16, 2014 @ 1:16 am
http://www.minirobo.ru/content/getting-back-ex-after-very-long-time
Comment by Leilani - July 11, 2014 @ 6:13 am
https://www.rebelmouse.com/sonia42tkeck/a-few-unique-guidelines-restau-614339333.html
Comment by Lindsay - July 08, 2014 @ 4:40 am
http://www.heateddogbed.org/
Comment by Jannette - July 06, 2014 @ 10:59 pm
http://www.wpseotricks.com/category/seo/
Comment by Allison - July 05, 2014 @ 8:57 am
http://webdesign-boeger.de/archive/48651
Comment by Benito - June 30, 2014 @ 9:56 am
http://www3.rn.ac.th/moodle/user/view.php?id=69816&course=1
Comment by Gennie - June 30, 2014 @ 7:50 am
http://www.newswire.net/newsroom/news/00083623-traffic-elixir-review.html
Comment by Kandis - June 27, 2014 @ 1:35 pm
http://www.easydisplay.co.uk/easy-slidestand-xl-billboards.html
Comment by Hayley - June 24, 2014 @ 7:01 pm
http://jd.krabbe.ca/tractors721050
Comment by Otis - June 07, 2014 @ 8:17 am
http://www.anonpedia.net/wiki/Gamers_de_El_portal_Youtube:_material_novedoso
Comment by Olaf - June 06, 2014 @ 10:13 am
http://Adolphkkxl434.Beeplog.com/442366_4264166.htm
Comment by Kate - June 06, 2014 @ 6:50 am
http://www.hoevehetrondgors.nl/index.php/gastenboek
Comment by Pearl - June 01, 2014 @ 1:06 am
http://ysd.be/cellineacena267217
Comment by Wanda - June 01, 2014 @ 1:06 am
http://www.hei-flyers.org/wordpress/groups/binaural-beats-what-jim-taught-jonny/
Comment by Trudy - May 30, 2014 @ 9:40 pm
http://www.carloscevola.com/
Comment by Bradford - May 28, 2014 @ 8:48 am
http://cpaintx.com/xe/?document_srl=127465
Comment by Emilie - May 11, 2014 @ 9:55 am
http://www.jondev.net/captcha/422b041b16996e8391c5f3f7b22490f9.png
Comment by http://www.jondev.net/captcha/422b041b16996e8391c5f3f7b22490f9.png - March 19, 2014 @ 9:53 am
http://www.richardgray.net/html/modules.php?name=Your_Account&op=userinfo&username=DeweyHudd
Comment by Klara - February 06, 2014 @ 9:57 pm
Hello sir,
I need to know whether this function will overwrite the existing files/folder while unzipping or not?
Comment by M00N - December 08, 2013 @ 5:32 am
Hello..this CODES is for JAVA right? I would like to ask if this .JAVA file needs also to create a .XML file to VIEW the RESULT or i say the DIRECTORIES? or this CODES is already MAKING a DIRECTORY to BROWSE what to ZIP/UNZIP a FILE?..i'm asking because our THESIS/CAPSTONE2 is having a abstract of ZIP and UNZIP so we would like to use this much more.. please REPLY ..
Comment by Chad - September 03, 2013 @ 3:05 pm
(sorry! Typo in my email) Hey, I have a question. when you unzip a file normally, where do the files go to? What map? Because Ive downloaded this emulator which needed a bios file to make it run, I downloaded it but I cant find it anywhere on my phone.. Ive got the samsung galaxy S2.
Comment by rick - May 24, 2012 @ 6:46 am
Hey, I have a question. when you unzip a file normally, where do the files go to? What map? Because Ive downloaded this emulator which needed a bios file to make it run, I downloaded it but I cant find it anywhere on my phone.. Ive got the samsung galaxy S2.
Comment by rick - May 24, 2012 @ 6:45 am
is it possible to implement password field for extracting the zip file?
Comment by Fahid - May 07, 2012 @ 5:26 am
If its too slow, consider optimizing by buffering output -- like this:

http://stackoverflow.com/questions/3975847/extrakting-zip-to-sd-card-is-very-slow-how-can-i-optimize-performance/10312761#10312761
Comment by Andre - April 25, 2012 @ 5:26 am
This works great when using the buffer Andy suggested. I would like it to display a Toast / Alert Dialog when the operation is done. How can I achieve that? Anyone can help?
Comment by Mircea M - April 05, 2012 @ 5:23 am
Highly recommend using a byte buffer like Andy mentioned, regardless of what type of device you use. For me this change was the difference between 15minutes to unzip and
Comment by AndDev - March 08, 2012 @ 3:21 pm
i am going to give this a try later.
Comment by chris franko - September 01, 2011 @ 8:31 am
How do I notify the MainActivity is done unzipping?
Comment by bong - June 15, 2011 @ 2:40 pm
Hello,

just wanted to tell you how happy I'm that I found your tutorial about unzipping files. It helped me alot! Thanks and have a great day. With your help it got clear how to tackle the problem!
Comment by Thomas - June 10, 2011 @ 6:42 am
Any solution for folders that contain a "SPACE"
??
Other then that it works great thanks
Comment by mxride - May 16, 2011 @ 1:04 pm
Help appreciated.

I have a foler on SD Card containing a ZIP archive,
Have created a test project with the above Class as MAIN, However I cant seem to figure out where to implement

String zipFile = Environment.getExternalStorageDirectory() + "/files.zip";
String unzipLocation = Environment.getExternalStorageDirectory() + "/unzipped/";

Decompress d = new Decompress(zipFile, unzipLocation);
d.unzip()

Any help is much appreciated..
Comment by mxride - May 12, 2011 @ 11:44 am
Thanks, Jon. Well done.
Comment by matt - February 28, 2011 @ 4:39 pm
This code works fine to me only when i create all destination folder before unzipping.
For ex:if files.zip contains[
folder_image -> a.png & b.png
folder_css ->x.css
file.txt ]
Iam getting Err like:" File Not found exception .../a.png " what is the problem?
Comment by vnshetty - February 26, 2011 @ 7:09 am
Really awesome code. I too experienced the nasty speed issues. I used Andy's snippet from the earlier comment and it runs at lightning speed now. You should glue that into an update to this code.
Comment by Ray Dios Haque - February 22, 2011 @ 9:33 pm
Hi,

I have a problem. When I unzip a file and if it contains any folder which has white spaces in its name then unziping stops there and does not go ahead.How to deal if we have any folder having white space in it?
Please help.

Thanks
Parvendra
Comment by Parvendra - February 16, 2011 @ 1:09 am
@Andy That's a good point! Thanks for the heads up :)
Comment by xil3 - January 18, 2011 @ 8:38 am
Hey, thanks for the tutorial, it's very informative.

Regarding the slow performance in the emulator, I've found that it goes much faster (a few seconds as opposed to a minute in the emulator) if you copy the bytes into a buffer instead of individually:

byte[] buffer = new byte[1024];
int length;
...
// replace for loop with:
while ((length = zin.read(buffer))>0) {
fout.write(buffer, 0, length);
}
Comment by Andy - January 14, 2011 @ 7:13 pm
Really helpful,,
Good Tutorial
Comment by Farhan - January 11, 2011 @ 6:10 am
The emulator will be a lot slower than any of the phones that you run it on - test it on a phone and see the difference. It's also dependant on your computer - I've seen the emulator be extremely slow on some.

I tested a 10mb file on mine and it went quick.
Comment by xil3 - December 25, 2010 @ 11:46 am
I am using the emulator to test. It is actually slow in the looping.
for (int c = zin.read(); c != -1; c = zin.read()){
Log.v("Decompress", "For Looping "+ ze.getName()); fout.write(c);
}
Comment by Chan Yao Kang - December 21, 2010 @ 1:27 am
What kind of phone are you testing it on?

Might be worth logging the process, to see where it's slowing down (Log.v("", "")).
Comment by xil3 - December 18, 2010 @ 3:56 pm
I have tested the class,I found that the unzip function is very slow performance. Is there anyway to improve it? Its takes few min to unzip 1 MB file.
Comment by Chan Yao Kang - December 17, 2010 @ 1:20 am

Name (required)
Email (will not be published) (required)
Website

captcha