code: private static boolean doUnpackEntry(ZipFile zf, String name, File file) throws IOException {
      if (log.isTraceEnabled()) {
        log.trace("Extracting '" + zf.getName() + "' entry '" + name + "' into '" + file + "'.");
      }
  
      ZipEntry ze = zf.getEntry(name);
      if (ze == null) {
        return false; // entry not found
      }
  
      if (ze.isDirectory() || zf.getInputStream(ze) == null) {
        if (file.isDirectory()) {
          return true;
        }
        if (file.exists()) {
          FileUtils.forceDelete(file);
        }
        return file.mkdirs();
      }
  
      InputStream in = new BufferedInputStream(zf.getInputStream(ze));
      try {
        FileUtils.copy(in, file);
      }
      finally {
        IOUtils.closeQuietly(in);
      }
      return true;
    }
docs: Unpacks a single file from a ZIP archive to a file.
  
  @param zf
  ZIP file.
  @param name
  entry name.
  @param file
  target file to be created or overwritten.
  @return <code>true</code> if the entry was found and unpacked,
  <code>false</code> if the entry was not found.