public class CalendarBuilder extends java.lang.Object implements ContentHandler
| Modifier and Type | Field and Description |
|---|---|
protected Calendar |
calendar |
protected Component |
component |
protected java.util.ArrayList |
datesMissingTimezones |
protected Property |
property |
protected Component |
subComponent |
| Constructor and Description |
|---|
CalendarBuilder()
Default constructor.
|
CalendarBuilder(CalendarParser parser)
Constructs a new calendar builder using the specified calendar parser.
|
CalendarBuilder(CalendarParser parser,
TimeZoneRegistry registry)
Constructs a new instance using the specified parser and registry.
|
CalendarBuilder(TimeZoneRegistry registry)
Constructs a new calendar builder using the specified timezone registry.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
void |
endCalendar()
Triggers the end of handling a calendar.
|
void |
endComponent(java.lang.String name)
Triggers the end of handling a component.
|
void |
endProperty(java.lang.String name)
Triggers the end of handling a property.
|
TimeZoneRegistry |
getRegistry()
Returns the timezone registry used in the construction of calendars.
|
void |
parameter(java.lang.String name,
java.lang.String value)
Triggers the handling of a parameter.
|
void |
propertyValue(java.lang.String value)
Triggers the handling of a property value.
|
void |
startCalendar()
Triggers the start of handling a calendar.
|
void |
startComponent(java.lang.String name)
Triggers the start of handling a component.
|
void |
startProperty(java.lang.String name)
Triggers the start of handling a property.
|
protected Calendar calendar
protected Component component
protected Component subComponent
protected Property property
protected java.util.ArrayList datesMissingTimezones
public CalendarBuilder()
public CalendarBuilder(CalendarParser parser)
parser - a calendar parser used to parse calendar filespublic CalendarBuilder(TimeZoneRegistry registry)
parser - a calendar parser used to parse calendar filespublic CalendarBuilder(CalendarParser parser, TimeZoneRegistry registry)
parser - a calendar parser used to construct the calendarregistry - a timezone registry used to retrieve TimeZones and register additional timezone information found
in the calendarpublic Calendar build(java.io.InputStream in) throws java.io.IOException, ParserException
in - java.io.IOExceptionParserExceptionpublic 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 - java.io.IOExceptionParserExceptionpublic Calendar build(UnfoldingReader uin) throws java.io.IOException, ParserException
uin - an unfolding reader to read data fromjava.io.IOExceptionParserExceptionpublic void endCalendar()
ContentHandlerendCalendar in interface ContentHandlerpublic void endComponent(java.lang.String name)
ContentHandlerendComponent in interface ContentHandlerpublic void endProperty(java.lang.String name)
ContentHandlerendProperty in interface ContentHandlerpublic void parameter(java.lang.String name,
java.lang.String value)
throws java.net.URISyntaxException
ContentHandlerparameter in interface ContentHandlerjava.net.URISyntaxExceptionpublic void propertyValue(java.lang.String value)
throws java.net.URISyntaxException,
java.text.ParseException,
java.io.IOException
ContentHandlerpropertyValue in interface ContentHandlerjava.net.URISyntaxExceptionjava.text.ParseExceptionjava.io.IOExceptionpublic void startCalendar()
ContentHandlerstartCalendar in interface ContentHandlerpublic void startComponent(java.lang.String name)
ContentHandlerstartComponent in interface ContentHandlerpublic void startProperty(java.lang.String name)
ContentHandlerstartProperty in interface ContentHandlerpublic final TimeZoneRegistry getRegistry()