public final class Ezvcard extends Object
Contains chaining factory methods for parsing/writing vCards. They are convenience methods that make use of the following classes:
Reading | Writing | |
---|---|---|
Plain text | VCardReader |
VCardWriter |
XML | XCardDocument , XCardReader |
XCardDocument , XCardWriter |
HTML | HCardParser |
HCardPage |
JSON | JCardReader |
JCardWriter |
Modifier and Type | Field and Description |
---|---|
static String |
ARTIFACT_ID
The Maven artifact ID.
|
static String |
GROUP_ID
The Maven group ID.
|
static String |
URL
The project webpage.
|
static String |
VERSION
The version of the library.
|
Modifier and Type | Method and Description |
---|---|
static ChainingTextParser<ChainingTextParser<?>> |
parse(InputStream in)
Parses plain text vCards.
|
static ChainingTextParser<ChainingTextParser<?>> |
parse(Path file)
Parses plain text vCards.
|
static ChainingTextParser<ChainingTextParser<?>> |
parse(Reader reader)
Parses plain text vCards.
|
static ChainingTextStringParser |
parse(String str)
Parses plain text vCards.
|
static ChainingHtmlParser<ChainingHtmlParser<?>> |
parseHtml(InputStream in)
Parses HTML-encoded vCards (hCard).
|
static ChainingHtmlParser<ChainingHtmlParser<?>> |
parseHtml(Path file)
Parses HTML-encoded vCards (hCard).
|
static ChainingHtmlParser<ChainingHtmlParser<?>> |
parseHtml(Reader reader)
Parses HTML-encoded vCards (hCard).
|
static ChainingHtmlStringParser |
parseHtml(String html)
Parses HTML-encoded vCards (hCard).
|
static ChainingHtmlParser<ChainingHtmlParser<?>> |
parseHtml(URL url)
Parses HTML-encoded vCards (hCard).
|
static ChainingJsonParser<ChainingJsonParser<?>> |
parseJson(InputStream in)
Parses JSON-encoded vCards (jCard).
|
static ChainingJsonParser<ChainingJsonParser<?>> |
parseJson(Path file)
Parses JSON-encoded vCards (jCard).
|
static ChainingJsonParser<ChainingJsonParser<?>> |
parseJson(Reader reader)
Parses JSON-encoded vCards (jCard).
|
static ChainingJsonStringParser |
parseJson(String json)
Parses JSON-encoded vCards (jCard).
|
static ChainingXmlMemoryParser |
parseXml(Document document)
Parses XML-encoded vCards (xCard).
|
static ChainingXmlParser<ChainingXmlParser<?>> |
parseXml(InputStream in)
Parses XML-encoded vCards (xCard) from an input stream.
|
static ChainingXmlParser<ChainingXmlParser<?>> |
parseXml(Path file)
Parses XML-encoded vCards (xCard) from a file.
|
static ChainingXmlParser<ChainingXmlParser<?>> |
parseXml(Reader reader)
Parses XML-encoded vCards (xCard) from a reader.
|
static ChainingXmlMemoryParser |
parseXml(String xml)
Parses XML-encoded vCards (xCard) from a string.
|
static ChainingTextWriter |
write(Collection<VCard> vcards)
Marshals one or more vCards to their traditional, plain-text
representation.
|
static ChainingTextWriter |
write(VCard... vcards)
Marshals one or more vCards to their traditional, plain-text
representation.
|
static ChainingHtmlWriter |
writeHtml(Collection<VCard> vcards)
Marshals one or more vCards their HTML representation (hCard).
|
static ChainingHtmlWriter |
writeHtml(VCard... vcards)
Marshals one or more vCards their HTML representation (hCard).
|
static ChainingJsonWriter |
writeJson(Collection<VCard> vcards)
Marshals one or more vCards to their JSON representation (jCard).
|
static ChainingJsonWriter |
writeJson(VCard... vcards)
Marshals one or more vCards to their JSON representation (jCard).
|
static ChainingXmlWriter |
writeXml(Collection<VCard> vcards)
Marshals one or more vCards to their XML representation (xCard).
|
static ChainingXmlWriter |
writeXml(VCard... vcards)
Marshals one or more vCards to their XML representation (xCard).
|
public static final String VERSION
public static final String GROUP_ID
public static final String ARTIFACT_ID
public static final String URL
public static ChainingTextStringParser parse(String str)
Parses plain text vCards.
Use VCardReader
for more control over the parsing.
str
- the vCard stringVCardReader
,
vCard 2.1,
RFC 2426 (3.0),
RFC 6350 (4.0)public static ChainingTextParser<ChainingTextParser<?>> parse(Path file)
Parses plain text vCards.
Use VCardReader
for more control over the parsing.
file
- the vCard fileVCardReader
,
vCard 2.1,
RFC 2426 (3.0),
RFC 6350 (4.0)public static ChainingTextParser<ChainingTextParser<?>> parse(InputStream in)
Parses plain text vCards.
Use VCardReader
for more control over the parsing.
in
- the input streamVCardReader
,
vCard 2.1,
RFC 2426 (3.0),
RFC 6350 (4.0)public static ChainingTextParser<ChainingTextParser<?>> parse(Reader reader)
Parses plain text vCards.
Use VCardReader
for more control over the parsing.
reader
- the readerVCardReader
,
vCard 2.1,
RFC 2426 (3.0),
RFC 6350 (4.0)public static ChainingXmlMemoryParser parseXml(String xml)
Parses XML-encoded vCards (xCard) from a string.
Use XCardDocument
or XCardReader
for more control over
the parsing.
xml
- the XML documentXCardDocument
,
XCardReader
,
RFC 6351public static ChainingXmlParser<ChainingXmlParser<?>> parseXml(Path file)
Parses XML-encoded vCards (xCard) from a file.
Use XCardDocument
or XCardReader
for more control over
the parsing.
file
- the XML fileXCardDocument
,
XCardReader
,
RFC 6351public static ChainingXmlParser<ChainingXmlParser<?>> parseXml(InputStream in)
Parses XML-encoded vCards (xCard) from an input stream.
Use XCardDocument
or XCardReader
for more control over
the parsing.
in
- the input stream to the XML documentXCardDocument
,
XCardReader
,
RFC 6351public static ChainingXmlParser<ChainingXmlParser<?>> parseXml(Reader reader)
Parses XML-encoded vCards (xCard) from a reader.
Note that use of this method is discouraged. It ignores the character
encoding that is defined within the XML document itself, and should only
be used if the encoding is undefined or if the encoding needs to be
ignored for some reason. The parseXml(InputStream)
method should
be used instead, since it takes the XML document's character encoding
into account when parsing.
Use XCardDocument
or XCardReader
for more control over
the parsing.
reader
- the reader to the XML documentXCardDocument
,
XCardReader
,
RFC 6351public static ChainingXmlMemoryParser parseXml(Document document)
Parses XML-encoded vCards (xCard).
Use XCardDocument
or XCardReader
for more control over
the parsing.
document
- the XML documentXCardDocument
,
XCardReader
,
RFC 6351public static ChainingHtmlStringParser parseHtml(String html)
Parses HTML-encoded vCards (hCard).
Use HCardParser
for more control over the parsing.
html
- the HTML pageHCardParser
,
hCard 1.0public static ChainingHtmlParser<ChainingHtmlParser<?>> parseHtml(Path file)
Parses HTML-encoded vCards (hCard).
Use HCardParser
for more control over the parsing.
file
- the HTML fileHCardParser
,
hCard 1.0public static ChainingHtmlParser<ChainingHtmlParser<?>> parseHtml(InputStream in)
Parses HTML-encoded vCards (hCard).
Use HCardParser
for more control over the parsing.
in
- the input stream to the HTML pageHCardParser
,
hCard 1.0public static ChainingHtmlParser<ChainingHtmlParser<?>> parseHtml(Reader reader)
Parses HTML-encoded vCards (hCard).
Use HCardParser
for more control over the parsing.
reader
- the reader to the HTML pageHCardParser
,
hCard 1.0public static ChainingHtmlParser<ChainingHtmlParser<?>> parseHtml(URL url)
Parses HTML-encoded vCards (hCard).
Use HCardParser
for more control over the parsing.
url
- the URL of the webpageHCardParser
,
hCard 1.0public static ChainingJsonStringParser parseJson(String json)
Parses JSON-encoded vCards (jCard).
Use JCardReader
for more control over the parsing.
json
- the JSON stringJCardReader
,
RFC 7095public static ChainingJsonParser<ChainingJsonParser<?>> parseJson(Path file)
Parses JSON-encoded vCards (jCard).
Use JCardReader
for more control over the parsing.
file
- the JSON fileJCardReader
,
RFC 7095public static ChainingJsonParser<ChainingJsonParser<?>> parseJson(InputStream in)
Parses JSON-encoded vCards (jCard).
Use JCardReader
for more control over the parsing.
in
- the input streamJCardReader
,
RFC 7095public static ChainingJsonParser<ChainingJsonParser<?>> parseJson(Reader reader)
Parses JSON-encoded vCards (jCard).
Use JCardReader
for more control over the parsing.
reader
- the readerJCardReader
,
RFC 7095public static ChainingTextWriter write(VCard... vcards)
Marshals one or more vCards to their traditional, plain-text representation.
Use VCardWriter
for more control over how the vCards are written.
vcards
- the vCards to marshalVCardWriter
,
vCard 2.1,
RFC 2426 (3.0),
RFC 6350 (4.0)public static ChainingTextWriter write(Collection<VCard> vcards)
Marshals one or more vCards to their traditional, plain-text representation.
Use VCardWriter
for more control over how the vCards are written.
vcards
- the vCards to marshalVCardWriter
,
vCard 2.1,
RFC 2426 (3.0),
RFC 6350 (4.0)public static ChainingXmlWriter writeXml(VCard... vcards)
Marshals one or more vCards to their XML representation (xCard).
Use XCardDocument
or XCardWriter
for more control over
how the vCards are written.
vcards
- the vCards to marshalXCardDocument
,
XCardWriter
,
RFC 6351public static ChainingXmlWriter writeXml(Collection<VCard> vcards)
Marshals one or more vCards to their XML representation (xCard).
Use XCardDocument
or XCardWriter
for more control over
how the vCards are written.
vcards
- the vCard to marshalXCardDocument
,
XCardWriter
,
RFC 6351public static ChainingHtmlWriter writeHtml(VCard... vcards)
Marshals one or more vCards their HTML representation (hCard).
Use HCardPage
for more control over how the vCards are written.
public static ChainingHtmlWriter writeHtml(Collection<VCard> vcards)
Marshals one or more vCards their HTML representation (hCard).
Use HCardPage
for more control over how the vCards are written.
public static ChainingJsonWriter writeJson(VCard... vcards)
Marshals one or more vCards to their JSON representation (jCard).
Use JCardWriter
for more control over how the vCards are written.
vcards
- the vCards to marshalJCardWriter
,
RFC 7095public static ChainingJsonWriter writeJson(Collection<VCard> vcards)
Marshals one or more vCards to their JSON representation (jCard).
Use JCardWriter
for more control over how the vCards are written.
vcards
- the vCards to marshalJCardWriter
,
RFC 7095Copyright © 2012–2023 Michael Angstadt. All rights reserved.