Package org.bedework.util.calendar
Class XmlCalendarBuilder
- java.lang.Object
-
- org.bedework.util.calendar.XmlCalendarBuilder
-
- All Implemented Interfaces:
Consumer<net.fortuna.ical4j.model.Calendar>
public class XmlCalendarBuilder extends Object implements Consumer<net.fortuna.ical4j.model.Calendar>
Parses and builds an iCalendar model from an xml 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 XmlCalendarBuilder()XmlCalendarBuilder(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- where an error occurs reading data from the specified streamnet.fortuna.ical4j.data.ParserException- where an error occurs parsing data from the stream
-
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- an unfolding reader to read data from- Returns:
- a calendar parsed from the specified reader
- Throws:
IOException- where an error occurs reading data from the specified readernet.fortuna.ical4j.data.ParserException- where 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
-
-