// Path: MCU-API/src/org/mcupdater/MCUApp.java
// public abstract class MCUApp {
// 	
// 	public Logger baseLogger;
// 
// 	public abstract void setStatus(String string);
// 	//public abstract void setProgressBar(int i);
// 	public abstract void addProgressBar(String title, String parent);
// 	public abstract void log(String msg);
// 	public abstract boolean requestLogin();
// 	public abstract void addServer(ServerList entry);
// 	public abstract DownloadQueue submitNewQueue(String queueName, String parent, Collection<Downloadable> files, File basePath, File cachePath);
// 	public abstract DownloadQueue submitAssetsQueue(String queueName, String parent, MinecraftVersion version);
// }


import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Path;
import java.util.Iterator;
import java.util.List;
import java.util.jar.*;
import java.util.logging.Level;
import java.util.zip.*;
import org.apache.commons.io.FileUtils;
import org.mcupdater.MCUApp;
		boolean renameStatus = archive.renameTo(tempFile);
		if (!renameStatus)
		{
			throw new RuntimeException("could not rename the file " + archive.getAbsolutePath() + " to " + tempFile.getAbsolutePath());
		}

		ZipInputStream zis = new ZipInputStream(new FileInputStream(tempFile));
		ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(archive));

		ZipEntry entry = zis.getNextEntry();
		while (entry != null)
		{
			String name = entry.getName();
			boolean notInFiles = true;
			Iterator<File> iterator = files.iterator();
			while (iterator.hasNext())
			{
				File f = iterator.next();
				if (f.getName().equals(name)) {
					notInFiles = false;
					break;
				}
			}
			if (notInFiles) {
				zos.putNextEntry(new ZipEntry(name));
				int len;
				while ((len = zis.read(buf)) > 0) {
					zos.write(buf,0,len);
				}
			}
// Path: MCU-API/src/org/mcupdater/MCUApp.java
// public abstract class MCUApp {
// 	
// 	public Logger baseLogger;
// 
// 	public abstract void setStatus(String string);
// 	//public abstract void setProgressBar(int i);
// 	public abstract void addProgressBar(String title, String parent);
// 	public abstract void log(String msg);
// 	public abstract boolean requestLogin();
// 	public abstract void addServer(ServerList entry);
// 	public abstract DownloadQueue submitNewQueue(String queueName, String parent, Collection<Downloadable> files, File basePath, File cachePath);
// 	public abstract DownloadQueue submitAssetsQueue(String queueName, String parent, MinecraftVersion version);
// }


// Path: MCU-API/src/org/mcupdater/util/Archive.java
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Path;
import java.util.Iterator;
import java.util.List;
import java.util.jar.*;
import java.util.logging.Level;
import java.util.zip.*;
import org.apache.commons.io.FileUtils;
import org.mcupdater.MCUApp;

		boolean renameStatus = archive.renameTo(tempFile);
		if (!renameStatus)
		{
			throw new RuntimeException("could not rename the file " + archive.getAbsolutePath() + " to " + tempFile.getAbsolutePath());
		}

		ZipInputStream zis = new ZipInputStream(new FileInputStream(tempFile));
		ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(archive));

		ZipEntry entry = zis.getNextEntry();
		while (entry != null)
		{
			String name = entry.getName();
			boolean notInFiles = true;
			Iterator<File> iterator = files.iterator();
			while (iterator.hasNext())
			{
				File f = iterator.next();
				if (f.getName().equals(name)) {
					notInFiles = false;
					break;
				}
			}
			if (notInFiles) {
				zos.putNextEntry(new ZipEntry(name));
				int len;
				while ((len = zis.read(buf)) > 0) {
					zos.write(buf,0,len);
				}
			}
			entry = zis.getNextEntry();