Constructor and Description |
---|
CalendarBuilder()
Default constructor.
|
CalendarBuilder(CalendarParser parser)
Constructs a new calendar builder using the specified calendar parser.
|
CalendarBuilder(CalendarParser parser,
PropertyFactoryRegistry propertyFactoryRegistry,
ParameterFactoryRegistry parameterFactoryRegistry,
TimeZoneRegistry tzRegistry)
Deprecated.
|
CalendarBuilder(CalendarParser parser,
java.util.function.Supplier<java.util.List<ParameterFactory<?>>> parameterFactorySupplier,
java.util.function.Supplier<java.util.List<PropertyFactory<?>>> propertyFactorySupplier,
java.util.function.Supplier<java.util.List<ComponentFactory<?>>> componentFactorySupplier,
TimeZoneRegistry tzRegistry) |
CalendarBuilder(CalendarParser parser,
TimeZoneRegistry tzRegistry)
Constructs a new instance using the specified parser and registry.
|
CalendarBuilder(TimeZoneRegistry tzRegistry)
Constructs a new calendar builder using the specified timezone registry.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(Calendar calendar) |
Calendar |
build(java.io.InputStream in)
Builds an iCalendar model from the specified input stream.
|
Calendar |
build(java.io.Reader in)
Builds an iCalendar model from the specified reader.
|
Calendar |
build(UnfoldingReader uin)
Build an iCalendar model by parsing data from the specified reader.
|
TimeZoneRegistry |
getRegistry()
Returns the timezone registry used in the construction of calendars.
|
public CalendarBuilder()
public CalendarBuilder(CalendarParser parser)
parser
- a calendar parser used to parse calendar filespublic CalendarBuilder(TimeZoneRegistry tzRegistry)
tzRegistry
- a timezone registry to populate with discovered timezonespublic CalendarBuilder(CalendarParser parser, TimeZoneRegistry tzRegistry)
parser
- a calendar parser used to construct the calendartzRegistry
- a timezone registry used to retrieve TimeZone
s and
register additional timezone information found
in the calendar@Deprecated public CalendarBuilder(CalendarParser parser, PropertyFactoryRegistry propertyFactoryRegistry, ParameterFactoryRegistry parameterFactoryRegistry, TimeZoneRegistry tzRegistry)
parser
- a custom calendar parsertzRegistry
- a custom timezone registrypublic CalendarBuilder(CalendarParser parser, java.util.function.Supplier<java.util.List<ParameterFactory<?>>> parameterFactorySupplier, java.util.function.Supplier<java.util.List<PropertyFactory<?>>> propertyFactorySupplier, java.util.function.Supplier<java.util.List<ComponentFactory<?>>> componentFactorySupplier, TimeZoneRegistry tzRegistry)
parser
- a custom calendar parsertzRegistry
- a custom timezone registrypublic void accept(Calendar calendar)
accept
in interface java.util.function.Consumer<Calendar>
public Calendar build(java.io.InputStream in) throws java.io.IOException, ParserException
in
- an input stream to read calendar data fromjava.io.IOException
- where an error occurs reading data from the specified streamParserException
- where an error occurs parsing data from the streampublic Calendar build(java.io.Reader in) throws java.io.IOException, ParserException
UnfoldingReader
is applied to the
specified reader to ensure the data stream is correctly unfolded where appropriate.in
- a reader to read calendar data fromjava.io.IOException
- where an error occurs reading data from the specified readerParserException
- where an error occurs parsing data from the readerpublic Calendar build(UnfoldingReader uin) throws java.io.IOException, ParserException
uin
- an unfolding reader to read data fromjava.io.IOException
- where an error occurs reading data from the specified readerParserException
- where an error occurs parsing data from the readerpublic final TimeZoneRegistry getRegistry()