Package org.bedework.util.calendar
Class JcalCalendarBuilder
- java.lang.Object
-
- org.bedework.util.calendar.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 Summary
Constructors Constructor Description JcalCalendarBuilder()Default constructor.JcalCalendarBuilder(net.fortuna.ical4j.model.TimeZoneRegistry tzRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(net.fortuna.ical4j.model.Calendar calendar)net.fortuna.ical4j.model.Calendarbuild(InputStream in)Builds an iCalendar model from the specified input stream.net.fortuna.ical4j.model.Calendarbuild(Reader in)Build an iCalendar model by parsing data from the specified reader.net.fortuna.ical4j.model.TimeZoneRegistrygetRegistry()Returns the timezone registry used in the construction of calendars.
-
-
-
Method Detail
-
accept
public void accept(net.fortuna.ical4j.model.Calendar 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 readernet.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 readernet.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
-
-