public interface VObjectDataListener
VObjectReader for handling data as it is
parsed off the data stream.VObjectReader.parse(com.github.mangstadt.vinnie.io.VObjectDataListener)| Modifier and Type | Method and Description |
|---|---|
void |
onComponentBegin(String name,
Context context)
Called when a component begins (in other words, when a BEGIN property is
encountered).
|
void |
onComponentEnd(String name,
Context context)
Called when a component ends (in other words, when an END property is
encountered).
|
void |
onProperty(VObjectProperty property,
Context context)
Called when a property is read.
|
void |
onVersion(String value,
Context context)
Called when a VERSION property is read whose value and position (as
defined in
SyntaxRules) are recognized as valid. |
void |
onWarning(Warning warning,
VObjectProperty property,
Exception thrown,
Context context)
Called when a non-fatal error occurs during parsing.
|
void onComponentBegin(String name, Context context)
name - the component name (will always be in uppercase)context - the parse contextvoid onComponentEnd(String name, Context context)
Called when a component ends (in other words, when an END property is encountered).
If a component ends before any of its subcomponents end, then the parser will generate "onComponentEnd" events for each subcomponent.
For example, the following data will cause the following sequence of events to occur. Notice that the outer component, A, ends before its subcomponents.
Data:
BEGIN:A BEGIN:B BEGIN:C END:A END:C END:B
Sequence of events:
name - the component name (will always be in uppercase)context - the parse contextvoid onProperty(VObjectProperty property, Context context)
property - the propertycontext - the parse contextvoid onVersion(String value, Context context)
SyntaxRules) are recognized as valid.value - the version stringcontext - the parse contextvoid onWarning(Warning warning, VObjectProperty property, Exception thrown, Context context)
warning - the warningproperty - the property that the warning is associated with, or null
if the warning is not associated with a propertythrown - the exception that was thrown or null if no exception was
throwncontext - the parse contextCopyright © 2016–2018 Michael Angstadt. All rights reserved.