public static void appendEntry(File zip, File entry) throws IOException {
		ZipOutputStream moddedZip = new ZipOutputStream(new FileOutputStream(zip.getPath() + "new"));
		ArrayList<ZipEntry> entryList = new ArrayList<ZipEntry>();
		
		if (zip.exists()) {
			
			ZipFile zipFile = new ZipFile(zip.getPath());
			
			Enumeration<? extends ZipEntry> entries = zipFile.entries();
			while (entries.hasMoreElements()) {
				ZipEntry e = entries.nextElement();
				entryList.add(e);
				moddedZip.putNextEntry(new ZipEntry(e.getName()));
				if (!e.isDirectory()) {
					copy(zipFile.getInputStream(e), moddedZip);
				}
				moddedZip.closeEntry();
			}	
			zipFile.close();
		}
		try {
			String name = entry.getName();
			ZipEntry zipEntry = new ZipEntry(name);
			boolean exists = false;
			for (ZipEntry thisEntry : entryList) {
				if (thisEntry.getName().equals(zipEntry.getName())) {
					System.out.println(thisEntry.getName() + zipEntry.getName());
					exists = true;
				}
			}
			if (!exists) {
				moddedZip.putNextEntry(zipEntry);
				
				FileInputStream fis = null;
				fis = new FileInputStream(entry);
				byte[] byteBuffer = new byte[1024];
				int bytesRead = -1;
				while ((bytesRead = fis.read(byteBuffer)) != -1) {
					moddedZip.write(byteBuffer, 0, bytesRead);
				}
				fis.close();
				moddedZip.closeEntry();
			}
		} 
		finally {
			try {
				moddedZip.close();
			} 
			catch (Exception e) {}
		}
		
		String path = zip.getPath();
		zip.delete();
		File newFile = new File(path);
		File oldFile = new File(path + "new");
		oldFile.renameTo(newFile);
	}