// Path: src/core/SettingsError.java
// public class SettingsError extends SimError {
// 
// 	public SettingsError(String cause) {
// 		super(cause);
// 	}
// 
// 	public SettingsError(String cause, Exception e) {
// 		super(cause,e);
// 	}
// 
// 	public SettingsError(Exception e) {
// 		super(e);
// 	}
// 
// }


import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import core.SettingsError;
	 * caches.
	 *
	 * @param traceFilePath		path to the trace file
	 * @param activityFilePath	path to the activity file
	 */
	private ExternalPathMovementReader(String traceFilePath,
			String activityFilePath) throws IOException {
		// Open the trace file for reading
		File inFile = new File(traceFilePath);
		long traceSize = inFile.length();
		long totalRead = 0;
		long readSize = 0;
		long printSize = 5*1024*1024;

		BufferedReader reader = null;
		ZipFile zf = null;
		try {
			if (traceFilePath.endsWith(".zip")) {
				// Grab the first entry from the zip file
				// TODO: try to find the correct entry based on file name
				zf = new ZipFile(traceFilePath);
				ZipEntry ze = zf.entries().nextElement();
				reader = new BufferedReader(
						new InputStreamReader(zf.getInputStream(ze)));
				traceSize = ze.getSize();
			} else {
				reader = new BufferedReader(
					new FileReader(traceFilePath));
			}
		} catch (FileNotFoundException e1) {
// Path: src/core/SettingsError.java
// public class SettingsError extends SimError {
// 
// 	public SettingsError(String cause) {
// 		super(cause);
// 	}
// 
// 	public SettingsError(String cause, Exception e) {
// 		super(cause,e);
// 	}
// 
// 	public SettingsError(Exception e) {
// 		super(e);
// 	}
// 
// }


// Path: src/input/ExternalPathMovementReader.java
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import core.SettingsError;

	 * caches.
	 *
	 * @param traceFilePath		path to the trace file
	 * @param activityFilePath	path to the activity file
	 */
	private ExternalPathMovementReader(String traceFilePath,
			String activityFilePath) throws IOException {
		// Open the trace file for reading
		File inFile = new File(traceFilePath);
		long traceSize = inFile.length();
		long totalRead = 0;
		long readSize = 0;
		long printSize = 5*1024*1024;

		BufferedReader reader = null;
		ZipFile zf = null;
		try {
			if (traceFilePath.endsWith(".zip")) {
				// Grab the first entry from the zip file
				// TODO: try to find the correct entry based on file name
				zf = new ZipFile(traceFilePath);
				ZipEntry ze = zf.entries().nextElement();
				reader = new BufferedReader(
						new InputStreamReader(zf.getInputStream(ze)));
				traceSize = ze.getSize();
			} else {
				reader = new BufferedReader(
					new FileReader(traceFilePath));
			}
		} catch (FileNotFoundException e1) {
			throw new SettingsError("Couldn't find external movement input " +