public class HCardParser extends StreamReader
Parses VCard
objects from an HTML page (hCard format).
Example:
URL url = new URL("http://example.com"); HCardParser parser = new HCardParser(url); List<VCard> vcards = parser.parseAll();
context, index, warnings
Constructor and Description |
---|
HCardParser(org.jsoup.nodes.Document document)
Creates an hCard document.
|
HCardParser(org.jsoup.nodes.Document document,
String pageUrl)
Creates an hCard document.
|
HCardParser(InputStream in)
Creates an hCard document.
|
HCardParser(InputStream in,
String pageUrl)
Creates an hCard document.
|
HCardParser(Path file)
Creates an hCard document.
|
HCardParser(Path file,
String pageUrl)
Creates an hCard document.
|
HCardParser(Reader reader)
Creates an hCard document.
|
HCardParser(Reader reader,
String pageUrl)
Creates an hCard document.
|
HCardParser(String html)
Creates an hCard document.
|
HCardParser(String html,
String pageUrl)
Creates an hCard document.
|
HCardParser(URL url)
Creates an hCard document.
|
Modifier and Type | Method and Description |
---|---|
protected VCard |
_readNext()
Reads the next vCard from the data stream.
|
void |
close() |
VCard |
readNext()
Reads the next vCard from the data stream.
|
assignLabels, getScribeIndex, getWarnings, readAll, registerScribe, setScribeIndex
public HCardParser(URL url) throws IOException
url
- the URL of the webpageIOException
- if there's a problem loading the webpagepublic HCardParser(InputStream in) throws IOException
in
- the input stream to the HTML pageIOException
- if there's a problem reading the HTML pagepublic HCardParser(InputStream in, String pageUrl) throws IOException
in
- the input stream to the HTML pagepageUrl
- the original URL of the HTML page (used to resolve
relative links)IOException
- if there's a problem reading the HTML pagepublic HCardParser(Path file) throws IOException
file
- the HTML fileIOException
- if there's a problem reading the HTML filepublic HCardParser(Path file, String pageUrl) throws IOException
file
- the HTML filepageUrl
- the original URL of the HTML page (used to resolve
relative links)IOException
- if there's a problem reading the HTML filepublic HCardParser(Reader reader) throws IOException
reader
- the input stream to the HTML pageIOException
- if there's a problem reading the HTML pagepublic HCardParser(Reader reader, String pageUrl) throws IOException
reader
- the input stream to the HTML pagepageUrl
- the original URL of the HTML page (used to resolve
relative links)IOException
- if there's a problem reading the HTML pagepublic HCardParser(String html)
html
- the HTML pagepublic HCardParser(String html, String pageUrl)
html
- the HTML pagepageUrl
- the original URL of the HTML page (used to resolve
relative links)public HCardParser(org.jsoup.nodes.Document document)
document
- the HTML pagepublic HCardParser(org.jsoup.nodes.Document document, String pageUrl)
document
- the HTML pagepageUrl
- the original URL of the HTML page (used to resolve
relative links)public VCard readNext()
StreamReader
readNext
in class StreamReader
protected VCard _readNext()
StreamReader
_readNext
in class StreamReader
public void close()
Copyright © 2012–2023 Michael Angstadt. All rights reserved.