|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectezvcard.io.HCardReader
public class HCardReader
Reads vCards encoded in HTML (hCard format).
Field Summary | |
---|---|
protected CategoriesType |
categories
|
protected VCard |
curVCard
|
protected Elements |
embeddedVCards
|
protected Map<String,Class<? extends VCardType>> |
extendedTypeClasses
|
protected Iterator<Element> |
it
|
protected List<LabelType> |
labels
|
protected NicknameType |
nickname
|
protected String |
pageUrl
|
protected Elements |
vcardElements
|
protected List<String> |
warnings
|
protected List<String> |
warningsBuffer
|
Constructor Summary | |
---|---|
HCardReader(File file)
|
|
HCardReader(File file,
String pageUrl)
|
|
HCardReader(InputStream in)
|
|
HCardReader(InputStream in,
String pageUrl)
|
|
HCardReader(Reader reader)
|
|
HCardReader(Reader reader,
String pageUrl)
|
|
HCardReader(String html)
|
|
HCardReader(String html,
String pageUrl)
|
|
HCardReader(URL url)
|
Method Summary | |
---|---|
List<String> |
getWarnings()
Gets the warnings from the last vCard that was unmarshalled. |
VCard |
readNext()
Reads the next vCard. |
void |
registerExtendedType(Class<? extends VCardType> clazz)
Registers an extended type class. |
void |
unregisterExtendedType(Class<? extends VCardType> clazz)
Removes an extended type class that was previously registered. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String pageUrl
protected List<String> warnings
protected Map<String,Class<? extends VCardType>> extendedTypeClasses
protected Elements vcardElements
protected Iterator<Element> it
protected List<LabelType> labels
protected List<String> warningsBuffer
protected VCard curVCard
protected Elements embeddedVCards
protected NicknameType nickname
protected CategoriesType categories
Constructor Detail |
---|
public HCardReader(URL url) throws IOException
url
- the URL of the webpage
IOException
- if there's a problem loading the webpagepublic HCardReader(InputStream in) throws IOException
in
- the input stream to the HTML page
IOException
- if there's a problem reading the HTML pagepublic HCardReader(InputStream in, String pageUrl) throws IOException
in
- the input stream to the HTML pagepageUrl
- the original URL of the HTML page
IOException
- if there's a problem reading the HTML pagepublic HCardReader(File file) throws IOException
file
- the HTML file
IOException
- if there's a problem reading the HTML filepublic HCardReader(File file, String pageUrl) throws IOException
file
- the HTML filepageUrl
- the original URL of the HTML page
IOException
- if there's a problem reading the HTML filepublic HCardReader(Reader reader) throws IOException
reader
- the input stream to the HTML page
IOException
- if there's a problem reading the HTML pagepublic HCardReader(Reader reader, String pageUrl) throws IOException
reader
- the input stream to the HTML pagepageUrl
- the original URL of the HTML page
IOException
- if there's a problem reading the HTML pagepublic HCardReader(String html)
html
- the HTML pagepublic HCardReader(String html, String pageUrl)
html
- the HTML pagepageUrl
- the original URL of the HTML pageMethod Detail |
---|
public void registerExtendedType(Class<? extends VCardType> clazz)
IParser
registerExtendedType
in interface IParser
clazz
- the extended type class to register (MUST have a public,
no-arg constructor)public void unregisterExtendedType(Class<? extends VCardType> clazz)
IParser
unregisterExtendedType
in interface IParser
clazz
- the extended type class to remove (MUST have a public,
no-arg constructor)public List<String> getWarnings()
IParser
getWarnings
in interface IParser
public VCard readNext()
IParser
readNext
in interface IParser
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |