code: public static void extract(final File zipfile, final File outdir) {
          try {
              ZipInputStream zin = new ZipInputStream(new FileInputStream(zipfile));
              ZipEntry entry;
              String name, dir;
              while ((entry = zin.getNextEntry()) != null) {
                  name = entry.getName();
                  if (entry.isDirectory()) {
                      mkdirs(outdir, name);
                      continue;
                  }
  
                  dir = dirpart(name);
                  if (dir != null) {
                      mkdirs(outdir, dir);
                  }
  
                  extractFile(zin, outdir, name);
              }
              zin.close();
          } catch (IOException e) {
              e.printStackTrace();
          }
      }
docs: *
  Extract zipfile to outdir with complete directory structure.
  
  @param zipfile Input .zip file
  @param outdir Output directory