private static boolean addToZip(String absolutePath, String relativePath, String fileName, ZipOutputStream out) {
		  File file = new File(absolutePath + File.separator + fileName);
		  DebugUtils.info("Adding \"" + absolutePath + File.separator + fileName + "\" file");
		  if (file.isHidden())
			  return true;
		  if (file.isDirectory()) {
			  absolutePath = absolutePath + File.separator + file.getName();
			  relativePath = relativePath + File.separator + file.getName();
			  for (String child : file.list()) {
				  if (!addToZip(absolutePath, relativePath, child, out)) {
					  return false;
				  }
			  }
			  return true;
	      }
		  
		  try {
			  byte[] data = new byte[2048];

			  FileInputStream fi = new FileInputStream(file);
			  BufferedInputStream origin = new BufferedInputStream(fi, 2048);
			  ZipEntry entry = new ZipEntry(relativePath + File.separator + fileName);
			  out.putNextEntry(entry);
			  
			  int count;
			  
			  while ((count = origin.read(data, 0, 2048)) != -1) {
				  out.write(data, 0, count);
		      }
			  origin.close();
		  } catch (Exception ex) {
			  DebugUtils.error(ex.getMessage());
			  ex.printStackTrace();
			  return false;
		  }
		  return true;
	  }