// Path: src/main/java/de/flapdoodle/embed/process/config/store/DownloadConfig.java
// @Value.Immutable
// public interface DownloadConfig {
// 	
// 	DistributionDownloadPath getDownloadPath();
// 	
// 	ProgressListener getProgressListener();
// 
// 	Directory getArtifactStorePath();
// 	
// 	TempNaming getFileNaming();
// 
// 	String getDownloadPrefix();
// 
// 	String getUserAgent();
// 
// 	Optional<String> getAuthorization();
// 
// 	PackageResolver getPackageResolver();
// 
// 	@Default
// 	default TimeoutConfig getTimeoutConfig() {
// 		return TimeoutConfig.defaults();
// 	}
// 	
// 	Optional<ProxyFactory> proxyFactory();
// 
// 	public static ImmutableDownloadConfig.Builder builder() {
// 		return ImmutableDownloadConfig.builder();
// 	}
// }
// 
// Path: src/main/java/de/flapdoodle/embed/process/config/store/FileType.java
// public enum FileType {
// 	Executable,
// 	Library
// }
// 
// Path: src/main/java/de/flapdoodle/embed/process/io/progress/ProgressListener.java
// public interface ProgressListener {
// 
// 	void progress(String label, int percent);
// 
// 	void done(String label);
// 
// 	void start(String label);
// 
// 	void info(String label, String message);
// }


import de.flapdoodle.embed.process.config.store.DownloadConfig;
import de.flapdoodle.embed.process.config.store.FileType;
import de.flapdoodle.embed.process.extract.ImmutableExtractedFileSet.Builder;
import de.flapdoodle.embed.process.io.progress.ProgressListener;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
			_logger.warn("\n--------------------------\n"
                    + "If you get this exception more than once, you should check if the file is corrupt.\n"
                    + "If you remove the file ({}), it will be downloaded again.\n"
                    + "--------------------------", source.getAbsolutePath(), iox);
			throw new IOException("File "+source.getAbsolutePath(),iox);
		}
	}

	@Override
	public ExtractedFileSet extract(DownloadConfig runtime, File source, FilesToExtract toExtract) throws IOException {
		Builder builder = ExtractedFileSet.builder(toExtract.baseDir())
				.baseDirIsGenerated(toExtract.baseDirIsGenerated());

		ProgressListener progressListener = runtime.getProgressListener();
		String progressLabel = "Extract " + source;
		progressListener.start(progressLabel);

		ArchiveWrapper archive = archiveStreamWithExceptionHint(source);

		try {
			org.apache.commons.compress.archivers.ArchiveEntry entry;
			while ((entry = archive.getNextEntry()) != null) {
				ExtractionMatch match = toExtract.find(new CommonsArchiveEntryAdapter(entry));
				if (match != null) {
					if (archive.canReadEntryData(entry)) {
						long size = entry.getSize();
						FileType type = match.type();
						File file = match.write(archive.asStream(entry), size);
						if (type==FileType.Executable) {
							builder.executable(file);
// Path: src/main/java/de/flapdoodle/embed/process/config/store/DownloadConfig.java
// @Value.Immutable
// public interface DownloadConfig {
// 	
// 	DistributionDownloadPath getDownloadPath();
// 	
// 	ProgressListener getProgressListener();
// 
// 	Directory getArtifactStorePath();
// 	
// 	TempNaming getFileNaming();
// 
// 	String getDownloadPrefix();
// 
// 	String getUserAgent();
// 
// 	Optional<String> getAuthorization();
// 
// 	PackageResolver getPackageResolver();
// 
// 	@Default
// 	default TimeoutConfig getTimeoutConfig() {
// 		return TimeoutConfig.defaults();
// 	}
// 	
// 	Optional<ProxyFactory> proxyFactory();
// 
// 	public static ImmutableDownloadConfig.Builder builder() {
// 		return ImmutableDownloadConfig.builder();
// 	}
// }
// 
// Path: src/main/java/de/flapdoodle/embed/process/config/store/FileType.java
// public enum FileType {
// 	Executable,
// 	Library
// }
// 
// Path: src/main/java/de/flapdoodle/embed/process/io/progress/ProgressListener.java
// public interface ProgressListener {
// 
// 	void progress(String label, int percent);
// 
// 	void done(String label);
// 
// 	void start(String label);
// 
// 	void info(String label, String message);
// }


// Path: src/main/java/de/flapdoodle/embed/process/extract/AbstractExtractor.java
import de.flapdoodle.embed.process.config.store.DownloadConfig;
import de.flapdoodle.embed.process.config.store.FileType;
import de.flapdoodle.embed.process.extract.ImmutableExtractedFileSet.Builder;
import de.flapdoodle.embed.process.io.progress.ProgressListener;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

			_logger.warn("\n--------------------------\n"
                    + "If you get this exception more than once, you should check if the file is corrupt.\n"
                    + "If you remove the file ({}), it will be downloaded again.\n"
                    + "--------------------------", source.getAbsolutePath(), iox);
			throw new IOException("File "+source.getAbsolutePath(),iox);
		}
	}

	@Override
	public ExtractedFileSet extract(DownloadConfig runtime, File source, FilesToExtract toExtract) throws IOException {
		Builder builder = ExtractedFileSet.builder(toExtract.baseDir())
				.baseDirIsGenerated(toExtract.baseDirIsGenerated());

		ProgressListener progressListener = runtime.getProgressListener();
		String progressLabel = "Extract " + source;
		progressListener.start(progressLabel);

		ArchiveWrapper archive = archiveStreamWithExceptionHint(source);

		try {
			org.apache.commons.compress.archivers.ArchiveEntry entry;
			while ((entry = archive.getNextEntry()) != null) {
				ExtractionMatch match = toExtract.find(new CommonsArchiveEntryAdapter(entry));
				if (match != null) {
					if (archive.canReadEntryData(entry)) {
						long size = entry.getSize();
						FileType type = match.type();
						File file = match.write(archive.asStream(entry), size);
						if (type==FileType.Executable) {
							builder.executable(file);
						} else {