public class XCardReader extends StreamReader
Reads xCards (XML-encoded vCards) in a streaming fashion.
Example:
Path file = Paths.get("vcards.xml");
try (XCardReader reader = new XCardReader(file)) {
VCard vcard;
while ((vcard = reader.readNext()) != null) {
//...
}
}
context, index, warnings| Constructor and Description |
|---|
XCardReader(InputStream in) |
XCardReader(Node node) |
XCardReader(Path file) |
XCardReader(Reader reader) |
XCardReader(String xml) |
| Modifier and Type | Method and Description |
|---|---|
protected VCard |
_readNext()
Reads the next vCard from the data stream.
|
void |
close()
Closes the underlying input stream.
|
assignLabels, getScribeIndex, getWarnings, readAll, readNext, registerScribe, setScribeIndexpublic XCardReader(String xml)
xml - the XML to read frompublic XCardReader(InputStream in)
in - the input stream to read frompublic XCardReader(Path file) throws IOException
file - the file to read fromIOException - if there is a problem opening the filepublic XCardReader(Reader reader)
reader - the reader to read frompublic XCardReader(Node node)
node - the DOM node to read fromprotected VCard _readNext() throws IOException
StreamReader_readNext in class StreamReaderIOException - if there's a problem reading from the streampublic void close() throws IOException
IOExceptionCopyright © 2012–2023 Michael Angstadt. All rights reserved.