Here my code for generation the calender.ics - File:
publicvoidcreateEvent(BookingDatebookingDate,Mandatorymandatory,Employeeemployee)throwsFileNotFoundException,IOException,ParserException,ConstraintViolationException{// Create a TimeZoneSystem.setProperty("net.fortuna.ical4j.timezone.cache.impl",MapTimeZoneCache.class.getName());TimeZoneRegistryregistry=TimeZoneRegistryFactory.getInstance().createRegistry();TimeZonetimezone=registry.getTimeZone("Europe/Berlin");VTimeZonetz=timezone.getVTimeZone();StringpathMandatoryFile=null;StringpathEmployeeFile=null;// Reading the file and creating the calendarCalendaricsCalendar=null;FileOutputStreamfout=null;if(bookingDate.isCreateCalendarMandatoryEntry()){// timezone = registry.getTimeZone(mandatory.getTimeZone());pathMandatoryFile="calendar.ics";fout=newFileOutputStream(pathMandatoryFile);try{FileInputStreamfin=newFileInputStream(pathMandatoryFile);CalendarBuilderbuilder=newCalendarBuilder();icsCalendar=builder.build(fin);}catch(Exceptione){}if(icsCalendar==null){icsCalendar=createNewCalender(pathMandatoryFile);}}
Can you help me, please
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have currently no idea what´s here the issue and I asked kindly for help.
I´m generating a ics - File. But if I would like to open the ics - File to get the Calender, I got the following error message:
Here my information:
ical4j Version 3.0.1
Java: 8 Build 181
My output from the ics - File:
Here my code for generation the calender.ics - File:
Can you help me, please
I suspect you need to close your inputstream to flush the buffer