use of net.fortuna.ical4j.data.CalendarOutputter in project openolat by klemens.
the class ICalFileCalendarManager method writeCalendarFile.
private boolean writeCalendarFile(Calendar calendar, String calType, String calId) {
File fKalendarFile = getCalendarFile(calType, calId);
OutputStream os = null;
try {
os = new BufferedOutputStream(new FileOutputStream(fKalendarFile, false));
CalendarOutputter calOut = new CalendarOutputter(false);
calOut.output(calendar, os);
} catch (Exception e) {
return false;
} finally {
FileUtils.closeSafely(os);
}
return true;
}
Aggregations