import java.io.*;
import java.util.ArrayList;
import java.util.Iterator;

public class Calendar
{	
	//filename target must be in same working directory as java program
	private String fileName = "outputcalendar.ics";
	private String header = "BEGIN:VCALENDAR\nVERSION:2.0\n";
	private String footer = "END:VCALENDAR\n";
	ArrayList<Vevent> allVevents = new ArrayList<Vevent>();

	//default constructor
	public Calendar()
	{

	}

	//overloaded constructor
	public Calendar(String fileName)
	{
		this.fileName = fileName;
	}

	public String getFileName()
	{
		return fileName;
	}

	public void importIcs(String inputIcsFile)
	{

	}

	public void exportIcs()
	{
		try
		{
			FileWriter fstream = new FileWriter(fileName);
			BufferedWriter out = new BufferedWriter(fstream);

			//HEADER
			out.write(header);

			//VEVENTS
		    Iterator veventsItr = allVevents.iterator();
		    while(veventsItr.hasNext())
		    {
		    	out.write(veventsItr.next().toString());
		    }
		    
			//FOOTER
			out.write(footer);
			out.close();
		}
		catch (Exception e)
		{
	  		System.err.println("Error when trying to export to .ics file:\n" + e.getMessage());
		}
	}

	public void addEvent(Vevent inputVevent)
	{
		//ensures that input parameters are gucci. Don't be passin in dirty data!
		if (inputVevent.isValid())
		{
			allVevents.add(inputVevent);
		}
		else
		{
			System.err.println("The event that you are trying to add is invalid!");
		}
	}	
}
@@ -223,21 +223,27 @@
 ate 
+final 
 String 
-header
+HEADER
  = %22
@@ -288,21 +288,27 @@
 ate 
+final 
 String 
-footer
+FOOTER
  = %22
@@ -626,25 +626,116 @@
 IcsFile)%0A%09%7B%0A
+%09%09//TODO%0A%09%09//parse the input file and add the appropriate events and what not to arraylists
 %0A
-
 %09%7D%0A%0A%09public 
@@ -897,14 +897,14 @@
 ite(
-header
+HEADER
 );%0A%0A
@@ -1101,14 +1101,14 @@
 ite(
-footer
+FOOTER
 );%0A%09

clean up Calendar.java