# Class ICalendarCodec

java.lang.Object
com.codename1.calendar.ICalendarCodec

public final class ICalendarCodec extends Object
Reads and writes the interoperable portion of RFC 5545 used by events, tasks, CalDAV, and file import/export. Unknown X-properties are preserved in provider data so a read/write cycle doesn't silently discard extensions.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static CalendarEvent`
  `readEvent(String text)`
  `static CalendarRecurrenceRule`
  `readRecurrenceRule(String value)`
  Parses a recurrence rule with or without an `RRULE:` prefix.
  `static CalendarTask`
  `readTask(String text)`
  `static String`
  `writeEvent(CalendarEvent event)`
  `static String`
  `writeRecurrenceRule(CalendarRecurrenceRule rule)`
  Serializes a recurrence rule without the `RRULE:` prefix.
  `static String`
  `writeTask(CalendarTask task)`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### writeEvent

    public static String writeEvent(CalendarEvent event)

  - ### writeTask

    public static String writeTask(CalendarTask task)

  - ### readEvent

    public static CalendarEvent readEvent(String text) throws CalendarException
    Throws:
      `CalendarException`

  - ### readTask

    public static CalendarTask readTask(String text) throws CalendarException
    Throws:
      `CalendarException`

  - ### writeRecurrenceRule

    public static String writeRecurrenceRule(CalendarRecurrenceRule rule)
    Serializes a recurrence rule without the `RRULE:` prefix.

  - ### readRecurrenceRule

    public static CalendarRecurrenceRule readRecurrenceRule(String value) throws CalendarException
    Parses a recurrence rule with or without an `RRULE:` prefix.
    Throws:
      `CalendarException`