Class JcalCalendarBuilder

  • All Implemented Interfaces:
    Consumer<net.fortuna.ical4j.model.Calendar>

    public class JcalCalendarBuilder
    extends Object
    implements Consumer<net.fortuna.ical4j.model.Calendar>
    Parses and builds an iCalendar model from a json input stream. Note that this class is not thread-safe.
    Version:
    1.0
    Author:
    Mike Douglass Created: Sept 8, 2010
    • Constructor Detail

      • JcalCalendarBuilder

        public JcalCalendarBuilder()
        Default constructor.
      • JcalCalendarBuilder

        public JcalCalendarBuilder​(net.fortuna.ical4j.model.TimeZoneRegistry tzRegistry)
        Parameters:
        tzRegistry - a custom timezone registry
    • Method Detail

      • accept

        public void accept​(net.fortuna.ical4j.model.Calendar calendar)
        Specified by:
        accept in interface Consumer<net.fortuna.ical4j.model.Calendar>
      • build

        public net.fortuna.ical4j.model.Calendar build​(InputStream in)
                                                throws IOException,
                                                       net.fortuna.ical4j.data.ParserException
        Builds an iCalendar model from the specified input stream.
        Parameters:
        in - an input stream to read calendar data from
        Returns:
        a calendar parsed from the specified input stream
        Throws:
        IOException - when an error occurs reading data from the specified reader
        net.fortuna.ical4j.data.ParserException - when an error occurs parsing data from the reader
      • build

        public net.fortuna.ical4j.model.Calendar build​(Reader in)
                                                throws IOException,
                                                       net.fortuna.ical4j.data.ParserException
        Build an iCalendar model by parsing data from the specified reader.
        Parameters:
        in - a reader to read data from
        Returns:
        a calendar parsed from the specified reader
        Throws:
        IOException - when an error occurs reading data from the specified reader
        net.fortuna.ical4j.data.ParserException - when an error occurs parsing data from the reader
      • getRegistry

        public final net.fortuna.ical4j.model.TimeZoneRegistry getRegistry()
        Returns the timezone registry used in the construction of calendars.
        Returns:
        a timezone registry