Loading src/main/java/at/bitfire/ical4android/JtxICalObject.kt +15 −5 Original line number Diff line number Diff line Loading @@ -535,11 +535,11 @@ open class JtxICalObject( } /** * Takes the current JtxICalObject, transforms it to an iCalendar and writes it in an OutputStream * @param [os] OutputStream where iCalendar should be written to * Takes the current JtxICalObject and transforms it to a Calendar (ical4j) * @return The current JtxICalObject transformed into a ical4j Calendar */ @UsesThreadContextClassLoader fun write(os: OutputStream) { fun getICalendarFormat(): Calendar? { Ical4Android.checkThreadContextClassLoader() val ical = Calendar() Loading @@ -549,7 +549,7 @@ open class JtxICalObject( val calComponent = when (component) { JtxContract.JtxICalObject.Component.VTODO.name -> VToDo(true /* generates DTSTAMP */) JtxContract.JtxICalObject.Component.VJOURNAL.name -> VJournal(true /* generates DTSTAMP */) else -> return else -> return null } ical.components += calComponent addProperties(calComponent.properties) Loading Loading @@ -625,7 +625,17 @@ open class JtxICalObject( } ICalendar.softValidate(ical) CalendarOutputter(false).output(ical, os) return ical } /** * Takes the current JtxICalObject, transforms it to an iCalendar and writes it in an OutputStream * @param [os] OutputStream where iCalendar should be written to */ @UsesThreadContextClassLoader fun write(os: OutputStream) { Ical4Android.checkThreadContextClassLoader() CalendarOutputter(false).output(this.getICalendarFormat(), os) } /** Loading Loading
src/main/java/at/bitfire/ical4android/JtxICalObject.kt +15 −5 Original line number Diff line number Diff line Loading @@ -535,11 +535,11 @@ open class JtxICalObject( } /** * Takes the current JtxICalObject, transforms it to an iCalendar and writes it in an OutputStream * @param [os] OutputStream where iCalendar should be written to * Takes the current JtxICalObject and transforms it to a Calendar (ical4j) * @return The current JtxICalObject transformed into a ical4j Calendar */ @UsesThreadContextClassLoader fun write(os: OutputStream) { fun getICalendarFormat(): Calendar? { Ical4Android.checkThreadContextClassLoader() val ical = Calendar() Loading @@ -549,7 +549,7 @@ open class JtxICalObject( val calComponent = when (component) { JtxContract.JtxICalObject.Component.VTODO.name -> VToDo(true /* generates DTSTAMP */) JtxContract.JtxICalObject.Component.VJOURNAL.name -> VJournal(true /* generates DTSTAMP */) else -> return else -> return null } ical.components += calComponent addProperties(calComponent.properties) Loading Loading @@ -625,7 +625,17 @@ open class JtxICalObject( } ICalendar.softValidate(ical) CalendarOutputter(false).output(ical, os) return ical } /** * Takes the current JtxICalObject, transforms it to an iCalendar and writes it in an OutputStream * @param [os] OutputStream where iCalendar should be written to */ @UsesThreadContextClassLoader fun write(os: OutputStream) { Ical4Android.checkThreadContextClassLoader() CalendarOutputter(false).output(this.getICalendarFormat(), os) } /** Loading