// Path: src/de/endrullis/utils/VelocityUtils.java
// public class VelocityUtils {
// 	private static boolean initialized = false;
// 
// 	public static void init() throws Exception {
// 		if (initialized) return;
// 
// 		// initialize Velocity
// 		InputStream inputStream = StreamUtils.getInputStream("velocity.properties");
// 		Properties properties = new Properties();
// 		properties.load(inputStream);
// 		Velocity.init(properties);
// 
// 		initialized = true;
// 	}
// 
// 
// 	public static Template getTemplate(String name) throws Exception {
// 		init();
// 
// 		InputStream resourceAsStream = VelocityUtils.class.getResourceAsStream("/" + name);
// 		if (resourceAsStream == null) throw new ResourceNotFoundException("Resource " + name + " could not be found");
// 
// 		// get the template
// 		return Velocity.getTemplate(name);
// 	}
// }


import de.endrullis.utils.VelocityUtils;
import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;
import java.io.*;
import java.sql.Time;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.GregorianCalendar;
					int duration = in.readInt();
					data = new ArrayList<MiniDataRecord>(duration);
					for (int i = 0; i < duration; i++) {
						data.add(new MiniDataRecord(in));
					}
					statsRegular = new StatsRecord(regularSum.getPulse(), regularSum.getPower(), regularSum.getPedalRpm(), duration, pulseCount);
					statsTotal = statsRegular;
					currentStats = null;
				} else
				if (format == 3) {
					startTime = new Time(in.readLong());
					programName = in.readUTF();
					programDuration = in.readInt();
					lastRecordRegular = new DataRecord(in);
					lastRecordTotal = new DataRecord(in);
					statsRegular = new StatsRecord(in);
					statsTotal = new StatsRecord(in);
					int dataSize = in.readInt();
					data = new ArrayList<MiniDataRecord>(dataSize);
					for (int i = 0; i < dataSize; i++) {
						data.add(new MiniDataRecord(in));
					}
					int pulseSize = in.readInt();
					for (int i = 0; i < pulseSize; i++) {
						pulseAfterSession.add(in.readInt());
					}
				} else {
					throw new IOException("Session format " + format + " too new for this version of JErgometer.  Seems you need to update JErgometer.");
				}
			} else {
// Path: src/de/endrullis/utils/VelocityUtils.java
// public class VelocityUtils {
// 	private static boolean initialized = false;
// 
// 	public static void init() throws Exception {
// 		if (initialized) return;
// 
// 		// initialize Velocity
// 		InputStream inputStream = StreamUtils.getInputStream("velocity.properties");
// 		Properties properties = new Properties();
// 		properties.load(inputStream);
// 		Velocity.init(properties);
// 
// 		initialized = true;
// 	}
// 
// 
// 	public static Template getTemplate(String name) throws Exception {
// 		init();
// 
// 		InputStream resourceAsStream = VelocityUtils.class.getResourceAsStream("/" + name);
// 		if (resourceAsStream == null) throw new ResourceNotFoundException("Resource " + name + " could not be found");
// 
// 		// get the template
// 		return Velocity.getTemplate(name);
// 	}
// }


// Path: src/org/jergometer/model/BikeSession.java
import de.endrullis.utils.VelocityUtils;
import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;
import java.io.*;
import java.sql.Time;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.GregorianCalendar;

					int duration = in.readInt();
					data = new ArrayList<MiniDataRecord>(duration);
					for (int i = 0; i < duration; i++) {
						data.add(new MiniDataRecord(in));
					}
					statsRegular = new StatsRecord(regularSum.getPulse(), regularSum.getPower(), regularSum.getPedalRpm(), duration, pulseCount);
					statsTotal = statsRegular;
					currentStats = null;
				} else
				if (format == 3) {
					startTime = new Time(in.readLong());
					programName = in.readUTF();
					programDuration = in.readInt();
					lastRecordRegular = new DataRecord(in);
					lastRecordTotal = new DataRecord(in);
					statsRegular = new StatsRecord(in);
					statsTotal = new StatsRecord(in);
					int dataSize = in.readInt();
					data = new ArrayList<MiniDataRecord>(dataSize);
					for (int i = 0; i < dataSize; i++) {
						data.add(new MiniDataRecord(in));
					}
					int pulseSize = in.readInt();
					for (int i = 0; i < pulseSize; i++) {
						pulseAfterSession.add(in.readInt());
					}
				} else {
					throw new IOException("Session format " + format + " too new for this version of JErgometer.  Seems you need to update JErgometer.");
				}
			} else {
				throw new IOException("File \"" + file.getName() + "\" is not a valid session file.");