public class ChainingXmlParser<T extends ChainingXmlParser<?>> extends Object
Ezvcard.parseXml(InputStream)
,
Ezvcard.parseXml(Path)
,
Ezvcard.parseXml(Reader)
Constructor and Description |
---|
ChainingXmlParser(Document dom) |
ChainingXmlParser(InputStream in) |
ChainingXmlParser(Path file) |
ChainingXmlParser(Reader reader) |
ChainingXmlParser(String string) |
Modifier and Type | Method and Description |
---|---|
List<VCard> |
all()
Reads all vCards from the stream.
|
VCard |
first()
Reads the first vCard from the stream.
|
T |
register(VCardPropertyScribe<? extends VCardProperty> scribe)
Registers a property scribe.
|
T |
warnings(List<List<ParseWarning>> warnings)
Provides a list object that any parser warnings will be put into.
|
public ChainingXmlParser(String string)
public ChainingXmlParser(InputStream in)
public ChainingXmlParser(Path file)
public ChainingXmlParser(Reader reader)
public ChainingXmlParser(Document dom)
public T register(VCardPropertyScribe<? extends VCardProperty> scribe)
scribe
- the scribepublic T warnings(List<List<ParseWarning>> warnings)
warnings
- the list object that will be populated with the warnings
of each parsed vCard. Each element in the list is a list of warnings for
one parsed vCard. Therefore, the size of this list will be equal to the
number of parsed vCards. If a vCard does not have any warnings, then its
warning list will be empty.public VCard first() throws IOException
IOException
- if there's an I/O problempublic List<VCard> all() throws IOException
IOException
- if there's an I/O problemCopyright © 2012–2023 Michael Angstadt. All rights reserved.