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.




Zipping Files with Android (Programmatically)

One majorly annoying issue that I stumbled upon, was the fact that I couldn't send multiple attachments using Intents to the Google Mail app. The quickest way around that was of course to compress all of the files into one (ZIP).

After searching around online, I didn't really find much on zipping files on your Android device - most of the articles were for standard java applications, which assumed that all your files were in the current directory that you wanted to zip.

So, I used what I could and whipped up my own wrapper class that allows you to easily zip files in Android!

Here is the class:


import android.util.Log;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;


public class Compress {
  private static final int BUFFER = 2048;

  private String[] _files;
  private String _zipFile;

  public Compress(String[] files, String zipFile) {
    _files = files;
    _zipFile = zipFile;
  }

  public void zip() {
    try  {
      BufferedInputStream origin = null;
      FileOutputStream dest = new FileOutputStream(_zipFile);

      ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(dest));

      byte data[] = new byte[BUFFER];

      for(int i=0; i < _files.length; i++) {
        Log.v("Compress", "Adding: " + _files[i]);
        FileInputStream fi = new FileInputStream(_files[i]);
        origin = new BufferedInputStream(fi, BUFFER);
        ZipEntry entry = new ZipEntry(_files[i].substring(_files[i].lastIndexOf("/") + 1));
        out.putNextEntry(entry);
        int count;
        while ((count = origin.read(data, 0, BUFFER)) != -1) {
          out.write(data, 0, count);
        }
        origin.close();
      }

      out.close();
    } catch(Exception e) {
      e.printStackTrace();
    }

  }

}

If that all makes sense to you already, then you probably won't be interested in my explanations below, otherwise, keep reading. :)


private static final int BUFFER = 2048;

private String[] _files;
private String _zipFile;

These are the properties that I've declared for the class.

The first is the BUFFER (for reading the data and writing it to the zip stream), second is the _files array, which will hold all the files (path as well) that will be zipped up, and the third is the name of the zip file (path as well).


public Compress(String[] files, String zipFile) {
  _files = files;
  _zipFile = zipFile;
}

This is the constructor, which is the first thing that gets called when instantiating the class - you'll pass it an array of the files you wish to zip, and a string of what the name of the final zip file will be. It then saves this data in the properties, to be used when you call the zip method.


BufferedInputStream origin = null;
FileOutputStream dest = new FileOutputStream(_zipFile);

ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(dest));

byte data[] = new byte[BUFFER];

Next we move into the zip method - the first things we do is setup our BufferedInputStream, which we'll be using to read the data from the file input stream (each file in the files array).

The FileOutputStream creates the zip file, and sets up the stream, which we then pass to the ZipOutputStream for writing to.

If you want more in depth details about each of these objects (classes), then do a quick search for FileOutputStream or ZipOutputStream in Google.


for(int i=0; i < _files.length; i++) {
  Log.v("Compress", "Adding: " + _files[i]);

  FileInputStream fi = new FileInputStream(_files[i]);
  origin = new BufferedInputStream(fi, BUFFER);
  
  ZipEntry entry = new ZipEntry(_files[i].substring(_files[i].lastIndexOf("/") + 1));
  out.putNextEntry(entry);

  int count;
  while ((count = origin.read(data, 0, BUFFER)) != -1) {
    out.write(data, 0, count);
  }
  
  origin.close();
}

out.close();

And here we have the main loop, which will go through each file in the _files array and compress each one into the zip file.

Here we first setup a FileInputStream for reading the files - the BufferedInputStream will manage the amount of data that it'll be reading at a time (based on the BUFFER).

The ZipEntry is used for adding the actual file/directory structure - for example, if you add '/mnt/sdcard/data/myzip.zip', it would actually create that directory structure in the zip file, so if you want to just add the file into the root of the zip, you'll need to parse it out. Personally, I just used substring, and lastIndexOf to grab the file at the end.

Once the entry is set, you can add it to the zip output stream using out.putNextEntry.

Now we have another loop, which will be used for reading the data, 2048 bytes at a time, and write it to the zip output stream (to the new entry location).

Finally, we clean up - close the streams.

I hope that made sense, and if I can change anything to make it more understandable, please let me know.

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


jon | June 12, 2010 | Comments (226)

Comments

http://www.dayonelog.com
Comment by Della - April 23, 2014 @ 7:56 pm
https://www.facebook.com/2bservice
Comment by Lorrine - April 23, 2014 @ 12:10 pm
https://www.facebook.com/homplapao
Comment by Octavio - April 23, 2014 @ 5:57 am
https://www.youtube.com/watch?v=fUXHuWrJw4U
Comment by Vito - April 23, 2014 @ 4:39 am
http://climate1stop.net/
Comment by Gita - April 22, 2014 @ 5:49 am
http://www.agentsofdrive.com
Comment by Kareem - April 22, 2014 @ 5:02 am
http://www.espadrillesshoesvip.com/
Comment by Gudrun - April 22, 2014 @ 1:27 am
http://www.pleasantononlinereports.com
Comment by Iesha - April 22, 2014 @ 12:31 am
http://irclnk.it/581216
Comment by Ethel - April 22, 2014 @ 12:07 am
http://www.isd-berlin.org
Comment by Isabelle - April 21, 2014 @ 10:59 pm
https://th-th.facebook.com/ragnarok.ro.th
Comment by Selene - April 21, 2014 @ 9:19 pm
http://as3nui.com/generic-viagra-best/
Comment by Starla - April 21, 2014 @ 5:29 pm
http://www.chargify.biz
Comment by Raquel - April 21, 2014 @ 4:35 pm
http://www.at-udon.com
Comment by Margo - April 21, 2014 @ 2:14 pm
http://www.agentsofdrive.com
Comment by Fran - April 21, 2014 @ 11:39 am
http://www.larrywrightbook.org
Comment by Rosalind - April 21, 2014 @ 1:28 am
http://www.gay-guides.org
Comment by Aleisha - April 21, 2014 @ 12:43 am
http://www.ouishare.us
Comment by Danielle - April 20, 2014 @ 7:06 pm
http://mooguk.net?a%5B%5D=basketball+%28%3Ca+href%3Dhttp%3A%2F%2Fmathias-gierens.de%2Fcgi-bin%2Finfo.php%3Fa%255B%255D%3D%253Ca%2Bhref%253Dhttp%253A%252F%252Fwww.povbc.ru%252Findex.php%252Fo-kolledzhe%252Fnovosti%252Fitem%252F59-obshchekolledzhnoe-sobranie%253Ebasketball%253C%252Fa%253E%3Ehttp%3A%2F%2Fmathias-gierens.de%2F%3C%2Fa%3E%29
Comment by Soon - April 20, 2014 @ 11:12 am
http://pinkurock324.pixnet.net/blog/post/42234043-%25E5%2595%259F%25E5%258B%2595%25E5%2586%25AC%25E8%2582%258C%25E7%25BE%258E%25E8%2586%259A%25E9%2597%259C%25E9%258D%25B5-miros%25E7%25B5%25A6%25E5%25A
Comment by Mitzi - April 20, 2014 @ 3:20 am
https://www.facebook.com/saleadidasshoes
Comment by Meagan - April 20, 2014 @ 1:18 am
http://www.eufirestarpro.org
Comment by Timmy - April 19, 2014 @ 10:22 pm
http://zweidreineun.de/forum/member.php?action=profile&uid=182227
Comment by Charmain - April 19, 2014 @ 8:25 pm
http://www.worldpussy.info
Comment by Karissa - April 19, 2014 @ 8:01 pm
http://www.dayonelog.com
Comment by Valentin - April 19, 2014 @ 7:58 pm
http://www.conflans-sur-lanterne.com
Comment by Elvis - April 19, 2014 @ 12:35 pm
http://icelongju.altervista.org/index.php?page=User&userID=73342
Comment by Karina - April 19, 2014 @ 8:36 am
http://bobg.biz/u/greatwhitema
Comment by Antje - April 18, 2014 @ 9:56 pm
http://www.cpatalking.com
Comment by Mellissa - April 18, 2014 @ 6:47 pm
http://frogmedia.com.co/blog/item/3-extensi%C3%B3n-para-mostrar-art%C3%ADculos-o-anuncios-de-prensa-estilo-headline-o-titular-tipo-diario-online
Comment by Soila - April 18, 2014 @ 12:57 pm
http://forum.apocalyptica.com/wbb/index.php?page=User&userID=63015
Comment by Nancy - April 18, 2014 @ 5:44 am
http://www2.ucy.ac.cy/~mariosh/test.php?a%5B%5D=%3Ca+href%3Dhttp%3A%2F%2Fwww.strobistfotografie.nl%2Fblog%2F%3Fp%3D59%2FRK%3D0%2FRS%3DXXSIMZj9wJJPP4U3NDuptejD_fA-%3Eufc%3C%2Fa%3E
Comment by Carley - April 18, 2014 @ 2:42 am
http://www.Designer-creations.com/Family/2005/Mom/ardguest.php
Comment by Eliza - April 18, 2014 @ 1:54 am
http://www.fluy.net
Comment by Eulalia - April 17, 2014 @ 4:00 pm
http://www.afrotainment.net/uprofile.php?UID=58026
Comment by Julius - April 17, 2014 @ 6:23 am
http://www.mahshar.com/pishraft/index.php?do=/profile-7767/info/
Comment by Connor - April 16, 2014 @ 6:19 pm
https://www.facebook.com/dress122
Comment by Latanya - April 16, 2014 @ 2:18 pm
http://muvids.com/buy-youtube-views/
Comment by Annabelle - April 16, 2014 @ 3:49 am
http://prohormonesstore.com/
Comment by Keri - April 16, 2014 @ 3:36 am
http://auditoriadeti.com.br/iPhonebrasileir/?p=1171
Comment by Merissa - April 15, 2014 @ 5:08 am
http://murphystudio.com/modules/profile/userinfo.php?uid=102325
Comment by Glenn - April 13, 2014 @ 7:53 pm
http://www.colorrotate.org
Comment by Wilbert - April 13, 2014 @ 6:36 pm
http://naturepharm.org/index.php/k2/drugs/animals/item/38-news3
Comment by Candace - April 13, 2014 @ 6:21 pm
http://www.findphd.com//modules.php/modules.php?name=Your_Account&op=userinfo&username=RFEK
Comment by Evelyne - April 13, 2014 @ 3:13 am
http://forexsite.info/
Comment by Charlotte - April 12, 2014 @ 11:49 pm
http://www.pleasantononlinereports.com
Comment by Francesco - April 12, 2014 @ 5:53 pm
http://www.teclis-usa.com
Comment by Tandy - April 12, 2014 @ 5:48 pm
http://www.agentsofdrive.com
Comment by Louis - April 12, 2014 @ 2:34 pm
http://mypottytrainingin3daysreview.blogspot.com
Comment by Emanuel - April 12, 2014 @ 9:12 am
http://www.evertkok.nl/informatica/PHP/test2.php/RK=0/RS=35UqjYH37OdkTrLFTgDgJ58QaX4-?a%5B%5D=justin+bieber+%28%3Ca+href%3Dhttp%3A%2F%2Ftracybutler505.skyrock.com%2F3210693849-Audi-A8-Used-Transmissions-For-Sale-Discounted-For-Spring-Incentive-At.html%3Eclick+here.%3C%2Fa%3E%29
Comment by Fredrick - April 12, 2014 @ 8:57 am
http://sabs.sn/web/index.php/fr/component/phocaguestbook/guestbook/1
Comment by Shauna - April 11, 2014 @ 12:40 pm
http://Www.standrewkim.org/index.php?page=1&document_srl=1501&mid=bCouncil
Comment by Trudy - April 11, 2014 @ 6:57 am
http://faithqonnect.com/index.php?do=/blog/55246/the-idiots-guide-to-learning-to-drive-explained/
Comment by Silke - April 11, 2014 @ 5:05 am
http://zauberhafte-momente.net/index.php/gaestebuch
Comment by Faye - April 10, 2014 @ 7:44 pm
https://www.facebook.com/SbobetTHCom
Comment by Callum - April 10, 2014 @ 9:46 am
https://www.silvercreekpreschool.ca/relationship-exactly-what-consider-cheating
Comment by Noel - April 09, 2014 @ 4:35 am
http://mrcg.evertidegames.com/User_talk:CharlinDun
Comment by Romeo - April 08, 2014 @ 10:40 am
http://2lo.vdl.pl/samorzad/?p=1399
Comment by Antje - April 07, 2014 @ 9:58 pm
http://exact.scoutingnienoord.com/index.php?option=com_easygb&
Comment by Katlyn - April 07, 2014 @ 7:19 pm
http://carolyne-mireille-voyance.fr/
Comment by Elane - April 06, 2014 @ 3:19 pm
http://www.protow.com/ResistanceCalculator/tabid/458/Default.aspx
Comment by Alexandria - April 06, 2014 @ 5:34 am
http://www.f3j.de/cms/index.php/die-mannschaft/andre-ziegler
Comment by Caitlin - April 05, 2014 @ 11:50 pm
http://www.welovesbo69.com
Comment by Mariano - April 05, 2014 @ 9:05 pm
http://www.Numbersnow.Co.uk/asos-phone-number/
Comment by Karla - April 05, 2014 @ 7:46 pm
http://www.numbersnow.co.uk/sky-phone-number/
Comment by Reta - April 05, 2014 @ 12:06 pm
http://www.welovesbo69.com
Comment by Odette - April 05, 2014 @ 11:39 am
http://web.inilah.com/read/detail/233692/puas-layanan-pt-nusuno-karya
Comment by Beulah - April 05, 2014 @ 1:33 am
http://vrc.myanmarido.org/node/44358
Comment by Demetra - April 05, 2014 @ 1:30 am
http://stukadoorsbedrijfpijpers.netbaseonline.nl/lib/phpinfo.php?a%5B%5D=%3Ca+href%3Dhttp%3A%2F%2Fwww.drink-fresh-juice.com%2Fblog%2F2009%2F10%2F04%2F1-welcome-to-lyften-bloggie.html%3Ehumor%3C%2Fa%3E
Comment by Lavonne - April 05, 2014 @ 12:19 am
https://www.facebook.com/GreavyAccountants
Comment by Casimira - April 04, 2014 @ 6:50 pm
http://www.43things.com/entries/view/6267844
Comment by Isidra - April 04, 2014 @ 10:59 am
https://www.facebook.com/WebDesignCroydon
Comment by Al - April 04, 2014 @ 2:02 am
https://www.facebook.com/sale.sexyDjung
Comment by Shawna - April 03, 2014 @ 9:00 pm
http://dublin.locanto.ie/ID_213595505/Apco-Garden-Design-Landscape-Gardeners-Dublin.html
Comment by Erica - April 02, 2014 @ 3:57 pm
http://www.t-shirtwiki.com/User:CleoDietzitzbew
Comment by Dalton - April 01, 2014 @ 2:14 pm
http://higasha.tumblr.com/post/77812472653/drug-rehab-centers-what-does-treatment-entail
Comment by Norris - April 01, 2014 @ 11:20 am
http://www.dayonelog.com
Comment by Kristina - April 01, 2014 @ 10:25 am
http://Www.weddingdressonlinesale.co.uk/
Comment by Marietta - April 01, 2014 @ 2:57 am
http://www.isd-berlin.org
Comment by Lelia - March 31, 2014 @ 4:24 pm
https://www.facebook.com/koreavacationtourcenter
Comment by Deangelo - March 31, 2014 @ 2:39 pm
http://www.hdfullwallpapers.net
Comment by Kourtney - March 30, 2014 @ 10:29 am
http://rlpn.net/pear_test_client/pear_test.php?a%5B%5D=%3Ca+href%3Dhttp%3A%2F%2Fdeedrazentner.wordpress.com%2F2014%2F02%2F11%2Fjust-how-to-handle-lawyers-and-make-them-do-the-job%2F%3Ejustin+bieber+vevo%3C%2Fa%3E
Comment by Keenan - March 29, 2014 @ 10:41 pm
http://www.havocsupplement.net
Comment by Dennis - March 29, 2014 @ 5:26 pm
http://www.youtube.com/watch?v=Rq1s4THvuIA
Comment by Julianne - March 29, 2014 @ 2:30 pm
http://oessol.com/xe/?document_srl=20017
Comment by Curt - March 29, 2014 @ 6:41 am
http://www.yell.com/biz/sentry-alarms-truro-3313305/
Comment by Christen - March 28, 2014 @ 11:57 pm
http://www.conseils-hotesse-webcam.com/
Comment by Aaliyah - March 28, 2014 @ 12:48 pm
http://www.cy-pr.com/analysis/erp-it.pl/RS=^ADAJ5M4ROXn6tfoiyKbzl6XXhzahTQ-
Comment by Ima - March 27, 2014 @ 12:26 pm
http://www.5dimes.eu
Comment by Swen - March 27, 2014 @ 12:22 am
http://enterminecraft.com/how-to-install-and-set-up-minecraft/
Comment by Marquis - March 26, 2014 @ 8:59 pm
http://iachereallybad.weebly.com/,http://omgiache.wordpress.com/,http://www.tumblr.com/blog/cmhuffman
Comment by Sanora - March 26, 2014 @ 7:41 am
http://www.muscle-gear.net/prosum-pharmaceuticals-2.html
Comment by Elva - March 25, 2014 @ 4:17 pm
http://wiki.cubeworld.com.pl/U%C5%BCytkownik:KatherineGhi
Comment by Jerome - March 25, 2014 @ 10:53 am
http://www.buy-and-sell-websites.com
Comment by Roy - March 24, 2014 @ 5:46 pm
http://www.justlivingbetter.com
Comment by Jeana - March 24, 2014 @ 3:58 pm
http://leahriddellphotography.com/2013/04/23/work-in-progress/
Comment by Willian - March 24, 2014 @ 1:31 am
http://how-to-losebellyfat.com/avoid-eating-this-to-lose-weight/feed/
Comment by Zella - March 23, 2014 @ 5:24 pm
http://sbobetsboth.com/
Comment by Raymond - March 23, 2014 @ 3:37 pm
http://Barneyqclv.Sosblogs.com/The-first-blog-b1/4-Go-To-Abc-Carpet-And-Home-On-Broadway-In-Gramercy-A-Paradise-For-Furniture-And-Home-Decoration-Lovers-b1-p4.htm
Comment by Geoffrey - March 23, 2014 @ 3:32 pm
http://www.montanatechcomponents.com/author/LynwoodBe
Comment by Yetta - March 23, 2014 @ 11:28 am
http://ttp://www.conceptholiday.com/
Comment by Deandre - March 23, 2014 @ 8:25 am
http://www.youtube.com/watch?v=LBw_f6byj6I
Comment by Veronique - March 22, 2014 @ 8:06 pm
http://www.onrpg.com/boards/members/1366530-Paulines187
Comment by Leanne - March 22, 2014 @ 1:00 pm
https://docs.google.com/file/d/0B7rfUv9zaLbzMGdTUWhsVmxJU0k/edit
Comment by Salina - March 22, 2014 @ 10:43 am
http://1freedownload.us/msn-account-hacker-pro-v2-2014-free-2/
Comment by Ernestina - March 22, 2014 @ 4:56 am
http://pro-hacks.org/deer-hunter-2014-hack-tool-unlimited-cash-gold-weapon/
Comment by Summer - March 22, 2014 @ 2:52 am
http://Transferr.com/
Comment by Austin - March 21, 2014 @ 8:08 pm
http://www.wallpapers.aleyares.com/profile/ancarvalho
Comment by Christine - March 21, 2014 @ 5:25 pm
http://62.178.241.58/wiki/index.php/User:TristaTrimm
Comment by Caitlyn - March 21, 2014 @ 9:18 am
http://torconfigfile.org/wiki/index.php?title=User:EddyThornm
Comment by Lillian - March 21, 2014 @ 3:13 am
http://pro-hacks.org/asphalt-8-hack-tool/
Comment by Erick - March 20, 2014 @ 8:59 am
http://1freedownload.org/clash-clans-hack-tool-cheats-2014/
Comment by Dian - March 20, 2014 @ 6:34 am
http://newsroom.svenskabostadsfonden.se/vigerland-aktieindex-vs-fastighetsindex-mellan-2000-2010/afcarnegie-2/
Comment by Greta - March 20, 2014 @ 5:34 am
http://www.catanddoggames.org/
Comment by Josette - March 20, 2014 @ 4:28 am
http://sbobetsboth.blogspot.com/
Comment by Charis - March 19, 2014 @ 2:22 pm
http://1freedownload.us/rust-hack-cheat-tool/
Comment by Lindsay - March 18, 2014 @ 3:08 am
http://1freedownload.us/brave-frontier-hack-tool-androidios/
Comment by Manie - March 18, 2014 @ 3:02 am
http://1freedownload.us/gmail-account-hacker-pro-3-1-2014/
Comment by Shelley - March 18, 2014 @ 2:56 am
http://www.bimetlaconnectionfrancaise.com
Comment by Jerome - March 18, 2014 @ 1:33 am
http://1freedownload.us/fifa-2014-ultimate-team-coinpoints-generator-mobile-device-mac-compatiable/
Comment by Ernestina - March 17, 2014 @ 9:49 pm
http://toko-batik-indonesia.com
Comment by Cameron - March 17, 2014 @ 8:42 pm
http://www.babatemple.org/content/know-about-electrical-cigarettes
Comment by Burton - March 17, 2014 @ 7:12 pm
http://www.doi-toshin.com/much-famous-crazy-taxi-sega-comes-free-android-play-store/
Comment by Leila - March 17, 2014 @ 12:57 pm
http://www.Iamsport.org/pg/blog/salvadoriplz/read/23992905/shoe-buying-before-you-go-read-these-tips
Comment by Cole - March 17, 2014 @ 3:54 am
http://goprodiver.com/tagged/diving
Comment by Laurel - March 17, 2014 @ 3:32 am
http://www.youtube.com/watch?v=VGF6Mm9sv1Q
Comment by Sherlene - March 16, 2014 @ 10:15 pm
http://th-th.facebook.com/2bservice
Comment by Darrin - March 16, 2014 @ 4:33 pm
https://www.facebook.com/PaknamDentist
Comment by Eloisa - March 16, 2014 @ 3:59 pm
http://zmarszczki.otten.pl/
Comment by Carrie - March 16, 2014 @ 12:47 am
http://hacker-software.org/deer-hunter-2014-hack-tool-unlimited-cash-gold-weapon/
Comment by Marcella - March 15, 2014 @ 3:50 pm
http://wiki.dithoap.com/index.php?title=User:KeishaU95sjhk
Comment by Mai - March 15, 2014 @ 12:37 pm
http://wiki.vtc.ru/index.php/%D0%A3%D1%87%D0%B0%D1%81%D1%82%D0%BD%D0%B8%D0%BA:DoraHeberling
Comment by Diane - March 15, 2014 @ 5:24 am
http://tinyurl.com/nmoa4re
Comment by Barbara - March 15, 2014 @ 5:18 am
http://tinyurl.com/kcdjkog
Comment by Adrianna - March 15, 2014 @ 2:19 am
http://sbobetsboth.com/
Comment by Astrid - March 14, 2014 @ 9:30 pm
http://www.findbe.com/profile-3198/info/
Comment by Ellie - March 14, 2014 @ 9:08 pm
http://amazing2thailand.de/author/DesmondHu
Comment by Michale - March 14, 2014 @ 7:33 pm
http://shopsale.com.br/twitter/index.php/sheriw62/all
Comment by Alicia - March 14, 2014 @ 6:59 pm
http://smarts.sparklinglogic.com/wiki/index.php?title=User:JettCreighton
Comment by Tonya - March 14, 2014 @ 4:47 pm
http://ww2wiki.us/index.php?title=User:MableEssex
Comment by Deloris - March 14, 2014 @ 4:45 pm
https://www.youtube.com/watch?v=zjNmPL00LT4
Comment by Ofelia - March 14, 2014 @ 4:40 pm
http://biospain2012.com
Comment by Violette - March 14, 2014 @ 5:49 am
https://www.facebook.com/koreavacationtourcenter
Comment by Melba - March 14, 2014 @ 2:19 am
https://www.facebook.com/NekoMall
Comment by Georgetta - March 13, 2014 @ 7:32 pm
http://www.paydayloansnofaxing24h.com/automobile-title-loans-with-no-clear-title/
http://www.journalspace.com/index.php?do=/blog/8798/vehicle-title-loans-with-out-clear-title/
http://www.23hq.com/username23954/story/15017103
http://www.zimbio.com/General/articles/0GxdrbHlKkO/Vehicle+Title+Loans+No+Clear+Title
http://journals.fotki.com/scotahqg/my-blog/entry/wbbdrksqrwdrf/
http://stricklandawox.wordpressy.pl/?p=4
http://www.journalspace.com/index.php?do=/blog/8795/vehicle-title-loans-devoid-of-clear-title/
http://bloggd.org/blog/v/05nf/Car+Or+Truck+Title+Loans+With+No+Clear+Title
http://monroeiztj.centerblog.net/2-automobile-title-loans-with-out-clear-title
http://www.23hq.com/abrahammpfr/story/15014941
http://www.xfire.com/blog/moraleskctx/5742367
http://username26347.deviantart.com/journal/Car-Or-Truck-Title-Loans-With-No-Clear-Title-421182409
http://wolfeglsv.deviantart.com/journal/Vehicle-Title-Loans-With-Out-Clear-Title-421180045
http://bgm.me/r/4686382
http://yourtrainings.com/lowellvxyo/trainings/992412/
http://username13575.postbit.com/
http://snyderixct.kazeo.com/auto-title-loans-with-out-clear-title,a3959276.html
http://darrinsnxo.mylivepage.com/blog/2184/3714_Vehicle_Title_Loans_With_Out_Clear_Title
http://armandoidsc.jigsy.com/entries/general/automobile-title-loans-with-out-clear-title
http://wallhnuz.postbit.com/
http://bowersepnt.wikispaces.com/Automobile+Title+Loans+Devoid+Of+Clear+Title
http://www.23hq.com/ryanjrja/story/15014745
http://www.savingsdaily.com/post/car-or-truck-title-loans-without-having-clear-title
http://daniloijlq.soup.io/post/379564179/Vehicle-Title-Loans-Without-The-Need-Of
http://username24442.u.yuku.com/bloggy/post/pid/40853
http://username26654.soup.io/post/379553411/Auto-Title-Loans-Without-The-Need-Of
http://www.nexopia.com/users/username17561/blog/1-auto-title-loans-with-no-clear-title
http://www.kiwibox.com/juliodrxh/blog/entry/112264403/car-or-truck-title-loans-devoid-of-clear-title/?pPage=0
http://www.dailystrength.org/people/3668691/journal/8605485
http://keithwfnt.soup.io/post/379544887/Vehicle-Title-Loans-Without-Having-Clear-Title
http://myindospace.com/blog/view_blog.php?BlogId=475705
Comment by Rosaura - March 13, 2014 @ 1:14 pm
http://www.itrackprogps.com
Comment by Royal - March 13, 2014 @ 1:00 pm
http://casinospilleautomater.org/
Comment by Candida - March 13, 2014 @ 12:58 pm
http://hyperisland.biz
Comment by Berenice - March 13, 2014 @ 11:18 am
https://www.youtube.com/watch?v=FNAsiJJk3AM
Comment by Shayna - March 13, 2014 @ 10:07 am
http://www.the-truth-about-cellulite.com
Comment by Norris - March 13, 2014 @ 9:53 am
http://www.xpertbets.com
Comment by Nikole - March 13, 2014 @ 6:24 am
http://motovlog.com/
Comment by Guadalupe - March 13, 2014 @ 12:57 am
https://www.facebook.com/Threeautoaccessories
Comment by Kay - March 12, 2014 @ 10:01 pm
http://perkachurr.tumblr.com/
Comment by Lorna - March 12, 2014 @ 7:35 pm
http://smileappeal.org
Comment by Sarah - March 12, 2014 @ 1:59 am
http://1freedownload.us/brave-frontier-hack-tool-androidios/
Comment by Dorothea - March 11, 2014 @ 6:15 am
http://unicentre.pk/?ppt_message=leprechaun-repellent-and-assured-search-engine-optimisation-corporations-the-disturbing-website-link
Comment by Keeley - March 09, 2014 @ 5:22 am
http://travisaqic.centerblog.net/4-fashion-tips-how-to-dress-and-look-your-best
Comment by Stacey - March 09, 2014 @ 12:35 am
http://www.muaythaiv.com
Comment by Maryellen - March 08, 2014 @ 5:46 pm
http://homestars.com/companies/2801098-custom-contracting?service_area=1865882
Comment by Nathaniel - March 08, 2014 @ 1:17 pm
http://craftfaironline.com/supplies.html
Comment by Florene - March 08, 2014 @ 4:52 am
http://www.lawreferralconnect.com/profile/kestarkey
Comment by Will - March 08, 2014 @ 4:39 am
http://www.ilovekt.org/neo_board/?document_srl=4395281
Comment by Waylon - March 08, 2014 @ 3:57 am
https://heello.com/cwarank
Comment by Clair - March 08, 2014 @ 3:22 am
http://www.valigiapronta.altervista.org/zenphoto/index.php?album=giro-mondo-manuel/filippine&image=100_4402.jpg
Comment by Krystle - March 08, 2014 @ 3:17 am
http://www.youtube.com/watch?v=IN996wxBKl4&feature=youtu.be
Comment by Irvin - March 07, 2014 @ 12:39 am
http://www.uschatline.com
Comment by Vania - March 06, 2014 @ 2:12 am
http://1freedownload.us/tag/den-raekkefolge-1886-gratis-keygen/
Comment by Isis - March 06, 2014 @ 1:22 am
http://canelovsangulo.net/
Comment by Larry - March 05, 2014 @ 8:06 pm
http://healthykidshealthydiet.com/
Comment by Tomas - March 05, 2014 @ 1:03 pm
http://milacik.mamam.sk/pytajte-sa-veterinara/professional-web-optimization-hand-bob-or-outsource-position
Comment by Barbra - March 05, 2014 @ 11:27 am
https://www.facebook.com/bangkokfancy
Comment by Rosaline - March 05, 2014 @ 2:56 am
http://1freedownload.us/facebook-hacks/facebook-password-hacker-v1-0-updated-january-2014/
Comment by Hildegard - March 05, 2014 @ 2:22 am
http://kalamazooattorneys.org/
Comment by Ashleigh - March 05, 2014 @ 1:58 am
http://1nick.fr
Comment by Kathie - March 05, 2014 @ 1:11 am
http://www.uschatline.com
Comment by Caitlyn - March 05, 2014 @ 12:24 am
http://Www.Agameofthronesseason4.com/
Comment by Madison - March 04, 2014 @ 5:45 am
http://healthykidshealthydiet.com/
Comment by Fletcher - March 04, 2014 @ 4:01 am
http://hacker-software.pw/facebook-hacks/facebook-password-hacker-v1-0-updated-january-2014/
Comment by Wilford - March 03, 2014 @ 10:32 pm
https://www.facebook.com/IAmImports
Comment by Alberta - March 03, 2014 @ 11:57 am
http://sbobetsboth.com/
Comment by Lawrence - March 03, 2014 @ 11:21 am
http://www.daviscountyutah.gov/offsite_link.cfm?location=http://www.achatmaisonperpignan.info
Comment by Bobbie - March 03, 2014 @ 3:54 am
http://www.buzzfeed.com/coolinternetdeals/thesis-themes-the-best-thesis-wordpress-child-th-m1ab
Comment by Audrea - March 03, 2014 @ 3:21 am
https://www.facebook.com/SbobetTH
Comment by Richelle - March 02, 2014 @ 11:35 pm
http://www.ablazedirectory.com/index.php?search=
Comment by Ahmad - March 02, 2014 @ 9:13 pm
https://www.facebook.com/SbobetTH
Comment by Marisa - March 02, 2014 @ 12:07 pm
https://Www.rebelmouse.com/mycaa/military-spouse-career-advance-445416540.html
Comment by Alphonso - March 02, 2014 @ 5:47 am
https://www.facebook.com/SealBattleOnline
Comment by Jake - March 01, 2014 @ 12:13 pm
http://www.youtube.com/watch?v=o_EsKuzSW8U
Comment by Melaine - February 23, 2014 @ 2:14 pm
http://www.uboomerutv.com/uprofile.php?UID=83064
Comment by Timothy - February 21, 2014 @ 5:21 am
http://www.atdhe.co.uk
Comment by Lenore - February 19, 2014 @ 12:39 am
http://buynnnproperties.com/
Comment by Ignacio - February 16, 2014 @ 6:23 pm
http://www.gamemantra.com/blog/index.php/what-things-to-sell-to-make-money/
Comment by Kris - February 16, 2014 @ 9:46 am
https://homestagings.wordpress.com
Comment by Shelli - February 08, 2014 @ 3:14 pm
http://www.ep2p4u.com/category/p2p4u-sports/
Comment by Kristen - February 06, 2014 @ 8:22 pm
http://konferensblog.wordpress.com/2013/10/07/dags-for-kick-off-i-skane/
Comment by Luisa - February 01, 2014 @ 3:53 am
http://www.youtube.com/watch?v=LwO9aZ-YLQg
Comment by Serena - January 29, 2014 @ 9:22 pm
http://www.youtube.com/watch?v=1o3Y2M6qppQ
Comment by Alta - January 29, 2014 @ 6:25 pm
http://www.villagematchmaker.com/date_com_review.html
Comment by Marshall - January 28, 2014 @ 8:58 pm
http://www.youtube.com/watch?v=rNjr8VxJ6zg
Comment by Luigi - January 27, 2014 @ 8:18 pm
http://www.south-africa.co
Comment by Elisa - January 25, 2014 @ 12:10 pm
http://www.maxesangels.com/british_escorts_london.htm
Comment by Forrest - January 21, 2014 @ 12:39 pm
http://www.alphacis.com
Comment by Tobias - January 13, 2014 @ 3:03 am
http://www.gomidsource.com/high-risk-processing.html
Comment by Mohamed - January 07, 2014 @ 4:19 am
http://www.yallahdubai.com/what-to-do/shopping/
Comment by Carroll - January 06, 2014 @ 3:47 am
http://www.yallahdubai.com/what-to-see/
Comment by Janis - January 05, 2014 @ 5:02 pm
http://Nbgnetworks.com/
Comment by Beverly - January 02, 2014 @ 5:15 am
http://buynnnproperties.com/
Comment by Ulysses - December 28, 2013 @ 9:44 am
http://kempenfeltbayschool-review.com
Comment by Shasta - December 17, 2013 @ 8:01 am
http://www.freetring.com/index.php?view=howitworks
Comment by Gustavo - December 16, 2013 @ 8:29 am
i'm using ur code here to zip up images and ftp them to an ftp server. with some android phones it works perfect, others i get invalid zip files/corrupt zip files, etc....any idea why this code would work on some phones and not others? seems strange to me!

Please do reply ASAP
Comment by Supriya - August 06, 2013 @ 8:10 am
How can i use this to zip a directory that contains directories in it, and zip all the content of the original directory( including files in child directories?
Comment by redalin - August 20, 2012 @ 10:17 am
its working ...once again thank u very much ...
Comment by Anand JK - August 08, 2012 @ 4:16 pm
Thank for the code it helps me lot
Comment by Anand - August 08, 2012 @ 4:15 pm
Site de TV por Assinatura TV Digital no PC
Comment by Amanda - April 26, 2012 @ 12:02 am
i'm using ur code here to zip up images and ftp them to an ftp server. with some android phones it works perfect, others i get invalid zip files/corrupt zip files, etc....any idea why this code would work on some phones and not others? seems strange to me!
Comment by Matt - May 10, 2011 @ 10:37 am
Very true! Makes a cahnge to see someone spell it out like that. :)
Comment by Micheal - May 06, 2011 @ 8:39 pm
If I want to use wildcards (ie. zip *.log into logs.zip) how can I use the compress class?
Comment by Nika - March 09, 2011 @ 8:14 pm
This is great! I have it working just fine.But when i m trying to zip a Folder which contains other files and folders then it throws an exception that
"it is a directory" can u please Help Me????
Thanks
Comment by Hamid - March 04, 2011 @ 3:56 pm
I just wrote another article on how to unzip files - http://jondev.net/articles/Unzipping_Files_with_Android_(Programmatically)
Comment by Jon - October 27, 2010 @ 4:30 pm
This is great! I have it working just fine. However, I too would like to see how to extract the zip file and save in a folder.
Comment by Rob - September 01, 2010 @ 1:34 pm
Nice work! Wouldn't mind the corresponding programmatic unzip!
Comment by Paul - August 12, 2010 @ 3:34 pm
Example usage:

String zipName = "/sdcard/zipname.zip";

String[] files = new String[] {"/sdcard/files/file_one.jpg", "/sdcard/files/file_two.gif"};

Compress c = new Compress(files, "zipname.zip");
c.zip();
Comment by Jon - June 24, 2010 @ 10:24 am
Sorry for the delay Burt - I'll add an example to the article later today.

I was on vacation and didn't get around to viewing the comments.
Comment by Jon - June 24, 2010 @ 10:16 am
Would you please show us a quick example of how to use this class? I tried both as having this as an internal class and as a helper (read: external) class.
Comment by Burt Shaw - June 17, 2010 @ 1:13 pm
Can you show us an example use? I'm not seeing how to use this. Compress (myarray, "zipnamehere"); does not work. What am I missing? Thanks
Comment by Burt - June 15, 2010 @ 8:39 pm

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

captcha