* The formatting value for the program
*/
public void export(File intothis, final Program[] list,
final CalendarExportSettings settings, final AbstractPluginProgramFormating formatting) {
try {
final ParamParser parser = new ParamParser();
final boolean nulltime = settings.getNullTime();
mTime.setTimeZone(TimeZone.getTimeZone("GMT"));
mDate.setTimeZone(TimeZone.getTimeZone("GMT"));
final PrintStreamProcessor processor = new PrintStreamProcessor() {
public void process(PrintStream out) throws IOException {
out.println("BEGIN:VCALENDAR");
out.println("PRODID:-//TV-Browser//Calendar Export Plugin");
printVersion(out);
for (int i = 0; i < list.length; i++) {
Program p = list[i];
out.println();
out.println("BEGIN:VEVENT");
Calendar c = Calendar.getInstance();
printCreated(out, mDate.format(c.getTime()) + "T"
+ mTime.format(c.getTime()), i);
if (settings.isClassificationPrivate()) {
out.println("CLASS:PRIVATE");
}
else if (settings.isClassificationConfidential()) {
out.println("CLASS:CONFIDENTIAL");
}
else if (settings.isClassificationPublic()) {
out.println("CLASS:PUBLIC");
}
out.println("PRIORITY:3");
String category = settings.getCategory().trim();
if (category.length() > 0) {
out.println("CATEGORIES:" + category);
}
c = CalendarToolbox.getStartAsCalendar(p);
out.println("UID:" + mDate.format(c.getTime()) + "-" + p.getID());
String summary = parser.analyse(formatting.getTitleValue(), p);
out.println("SUMMARY:" + CalendarToolbox.noBreaks(summary));
out.println("DTSTART:" + mDate.format(c.getTime()) + "T"
+ mTime.format(c.getTime()) + "Z");
String desc = parser.analyse(formatting.getContentValue(), p);
if (parser.showErrors()) {
return;
}
out.println("DESCRIPTION:" + CalendarToolbox.noBreaks(desc));
if (!nulltime) {