public class ChainingTextParser<T extends ChainingTextParser<?>> extends Object
Ezvcard.parse(InputStream)
,
Ezvcard.parse(Path)
,
Ezvcard.parse(Reader)
Constructor and Description |
---|
ChainingTextParser(InputStream in) |
ChainingTextParser(Path file) |
ChainingTextParser(Reader reader) |
ChainingTextParser(String string) |
Modifier and Type | Method and Description |
---|---|
List<VCard> |
all()
Reads all vCards from the stream.
|
T |
caretDecoding(boolean enable)
Sets whether the reader will decode characters in parameter values that
use circumflex accent encoding (enabled by default).
|
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 ChainingTextParser(String string)
public ChainingTextParser(InputStream in)
public ChainingTextParser(Reader reader)
public ChainingTextParser(Path file)
public T caretDecoding(boolean enable)
enable
- true to use circumflex accent decoding, false not toVCardReader.setCaretDecodingEnabled(boolean)
,
RFC 6868public 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.