question: public static void unzip ( String zipFile , String location ) throws IOException { final int BUFFER_SIZE = 10240 ; int size ; byte [ ] buffer = new byte [ BUFFER_SIZE ] ; try { if ( ! location . endsWith ( "/" ) ) { location += "/" ; } File f = new File ( location ) ; if ( ! f . isDirectory ( ) ) { f . mkdirs ( ) ; } ZipInputStream zin = new ZipInputStream ( new BufferedInputStream ( new FileInputStream ( zipFile ) , BUFFER_SIZE ) ) ; try { ZipEntry ze = null ; while ( ( ze = zin . getNextEntry ( ) ) != null ) { String path = location + ze . getName ( ) ; File unzipFile = new File ( path ) ; if ( ze . isDirectory ( ) ) { if ( ! unzipFile . isDirectory ( ) ) { unzipFile . mkdirs ( ) ; } } else { File parentDir = unzipFile . getParentFile ( ) ; if ( null != parentDir ) { if ( ! parentDir . isDirectory ( ) ) { parentDir . mkdirs ( ) ; } } FileOutputStream out = new FileOutputStream ( unzipFile , false ) ; BufferedOutputStream fout = new BufferedOutputStream ( out , BUFFER_SIZE ) ; try { while ( ( size = zin . read ( buffer , 0 , BUFFER_SIZE ) ) != - 1 ) { fout . write ( buffer , 0 , size ) ; } zin . closeEntry ( ) ; } finally { fout . flush ( ) ; fout . close ( ) ; } } } } finally { zin . close ( ) ; } } catch ( Exception e ) { Log . e ( TAG , "Unzip exception" , e ) ; } }
target:  Unzip a zip file.  Will overwrite existing files.