public 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 | Class and Description |
---|---|
static class |
Ezvcard.ParserChainTextReader
Chainer class for parsing plain text vCards.
|
static class |
Ezvcard.ParserChainTextString
Chainer class for parsing plain text vCards.
|
static class |
Ezvcard.ParserChainXmlDom
Chainer class for parsing XML vCards.
|
static class |
Ezvcard.ParserChainXmlReader
Chainer class for parsing XML vCards.
|
static class |
Ezvcard.ParserChainXmlString
Chainer class for parsing XML vCards.
|
static class |
Ezvcard.WriterChainText
Chainer class for writing plain text vCards
|
static class |
Ezvcard.WriterChainXml
Chainer class for writing XML vCards (xCard).
|
Modifier and Type | Method and Description |
---|---|
static Ezvcard.ParserChainTextReader |
parse(File file)
Parses plain text vCards.
|
static Ezvcard.ParserChainTextReader |
parse(InputStream in)
Parses plain text vCards.
|
static Ezvcard.ParserChainTextReader |
parse(Reader reader)
Parses plain text vCards.
|
static Ezvcard.ParserChainTextString |
parse(String str)
Parses plain text vCards.
|
static Ezvcard.ParserChainXmlDom |
parseXml(Document document)
Parses XML-encoded vCards (xCard).
|
static Ezvcard.ParserChainXmlReader |
parseXml(File file)
Parses XML-encoded vCards (xCard) from a file.
|
static Ezvcard.ParserChainXmlReader |
parseXml(InputStream in)
Parses XML-encoded vCards (xCard) from an input stream.
|
static Ezvcard.ParserChainXmlReader |
parseXml(Reader reader)
Parses XML-encoded vCards (xCard) from a reader.
|
static Ezvcard.ParserChainXmlString |
parseXml(String xml)
Parses XML-encoded vCards (xCard) from a string.
|
static Ezvcard.WriterChainText |
write(Collection<VCard> vcards)
Marshals one or more vCards to their traditional, plain-text
representation.
|
static Ezvcard.WriterChainText |
write(VCard... vcards)
Marshals one or more vCards to their traditional, plain-text
representation.
|
static Ezvcard.WriterChainXml |
writeXml(Collection<VCard> vcards)
Marshals one or more vCards to their XML representation (xCard).
|
static Ezvcard.WriterChainXml |
writeXml(VCard... vcards)
Marshals one or more vCards to their XML representation (xCard).
|
public static Ezvcard.ParserChainTextString 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 Ezvcard.ParserChainTextReader parse(File 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 Ezvcard.ParserChainTextReader 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 Ezvcard.ParserChainTextReader 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 Ezvcard.ParserChainXmlString 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 Ezvcard.ParserChainXmlReader parseXml(File 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 Ezvcard.ParserChainXmlReader 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 Ezvcard.ParserChainXmlReader 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 whatever 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 Ezvcard.ParserChainXmlDom 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 Ezvcard.WriterChainText 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 Ezvcard.WriterChainText 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 Ezvcard.WriterChainXml 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 Ezvcard.WriterChainXml 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 6351This software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.