public class ChainingJsonParser<T extends ChainingJsonParser<?>> extends Object
Ezvcard.parseJson(InputStream)
,
Ezvcard.parseJson(Path)
,
Ezvcard.parseJson(Reader)
Constructor and Description |
---|
ChainingJsonParser(InputStream in) |
ChainingJsonParser(Path file) |
ChainingJsonParser(Reader reader) |
ChainingJsonParser(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 ChainingJsonParser(String string)
public ChainingJsonParser(InputStream in)
public ChainingJsonParser(Reader reader)
public ChainingJsonParser(Path file)
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.