public final class VCardContact extends Object
Represents a vCard contact
| Constructor and Description |
|---|
VCardContact()
Initializes a new instance of the
VCardContact class |
| Modifier and Type | Method and Description |
|---|---|
VCardDeliveryAddressCollection |
getDeliveryAddresses()
Gets or sets a delivery addresses
|
VCardEmailCollection |
getEmails()
Gets or sets a contact's email addresses
|
VCardExplanatoryInfo |
getExplanatoryInfo()
Gets or sets a vCard explanatory information
|
StringCollection |
getExtendedProperties()
Gets or sets an extended properties
|
VCardGeo |
getGeo()
Gets or sets a global positioning
|
VCardIdentificationInfo |
getIdentificationInfo()
Gets or sets an identification properties
|
VCardLabelCollection |
getLabels()
Gets or sets a delivery addresses
|
String |
getMailer()
Gets or sets a mailer
|
VCardOrganization |
getOrganization()
Gets or sets an organization information
|
VCardSecurity |
getSecurity()
Gets or sets a security properites
|
VCardTelephoneNumberCollection |
getTelephoneNumbers()
Gets or sets a contact's telephone numbers
|
String |
getTimeZone()
Gets or sets a timeZone
|
static boolean |
isMultiContacts(InputStream stream)
Checks whether source stream contains multi contacts.
|
static boolean |
isMultiContacts(String filePath)
Checks whether source file contains multi contacts.
|
static VCardContact |
load(InputStream stream)
Reads
VCardContact from the specified stream containing vCard. |
static VCardContact |
load(InputStream stream,
Charset encoding)
Reads
VCardContact from the specified stream containing vCard. |
static VCardContact |
load(String filePath)
Reads
VCardContact from the specified vCard file
The supported vCard versions are 2.1 and 3.0 |
static VCardContact |
load(String filePath,
Charset encoding)
Reads
VCardContact from the specified vCard file
The supported vCard versions are 2.1 and 3.0 |
static List<VCardContact> |
loadAsMultiple(InputStream stream)
Loads list of contacts from multi contact stream.
|
static List<VCardContact> |
loadAsMultiple(InputStream stream,
Charset encoding)
Deprecated.
Tthis method is obsolete and will be removed soon. Use LoadAsMultiple(Stream stream, VCardLoadOptions options) method instead of it.
|
static List<VCardContact> |
loadAsMultiple(InputStream stream,
VCardLoadOptions options)
Loads list of contacts from multi contact stream.
|
static List<VCardContact> |
loadAsMultiple(String filePath)
Loads list of contacts from multi contact file.
|
static List<VCardContact> |
loadAsMultiple(String filePath,
Charset encoding)
Deprecated.
Tthis method is obsolete and will be removed soon. Use LoadAsMultiple(string filePath, VCardLoadOptions options) method instead of it.
|
static List<VCardContact> |
loadAsMultiple(String filePath,
VCardLoadOptions options) |
void |
save(OutputStream stream)
Saves this
MapiContact into the given stream with vCard format. |
void |
save(OutputStream stream,
ContactSaveOptions saveOptions)
Saves this
MapiContact to the given stream using specified save options. |
void |
save(OutputStream stream,
int saveFormat)
Saves this
MapiContact to the given stream with a format using the default options. |
void |
save(String filePath)
Saves this
MapiContact to the vCard file with a default options. |
void |
save(String filePath,
ContactSaveOptions saveOptions)
Saves this
MapiContact into file using specified save options. |
void |
save(String filePath,
int saveFormat)
Saves this
MapiContact to the specified file with a format using the default options. |
void |
setDeliveryAddresses(VCardDeliveryAddressCollection value)
Gets or sets a delivery addresses
|
void |
setEmails(VCardEmailCollection value)
Gets or sets a contact's email addresses
|
void |
setExplanatoryInfo(VCardExplanatoryInfo value)
Gets or sets a vCard explanatory information
|
void |
setExtendedProperties(StringCollection value)
Gets or sets an extended properties
|
void |
setGeo(VCardGeo value)
Gets or sets a global positioning
|
void |
setIdentificationInfo(VCardIdentificationInfo value)
Gets or sets an identification properties
|
void |
setLabels(VCardLabelCollection value)
Gets or sets a delivery addresses
|
void |
setMailer(String value)
Gets or sets a mailer
|
void |
setOrganization(VCardOrganization value)
Gets or sets an organization information
|
void |
setSecurity(VCardSecurity value)
Gets or sets a security properites
|
void |
setTelephoneNumbers(VCardTelephoneNumberCollection value)
Gets or sets a contact's telephone numbers
|
void |
setTimeZone(String value)
Gets or sets a timeZone
|
public VCardContact()
Initializes a new instance of the VCardContact class
public final VCardIdentificationInfo getIdentificationInfo()
Gets or sets an identification properties
public final void setIdentificationInfo(VCardIdentificationInfo value)
Gets or sets an identification properties
public final VCardDeliveryAddressCollection getDeliveryAddresses()
Gets or sets a delivery addresses
public final void setDeliveryAddresses(VCardDeliveryAddressCollection value)
Gets or sets a delivery addresses
public final VCardLabelCollection getLabels()
Gets or sets a delivery addresses
public final void setLabels(VCardLabelCollection value)
Gets or sets a delivery addresses
public final VCardTelephoneNumberCollection getTelephoneNumbers()
Gets or sets a contact's telephone numbers
public final void setTelephoneNumbers(VCardTelephoneNumberCollection value)
Gets or sets a contact's telephone numbers
public final VCardEmailCollection getEmails()
Gets or sets a contact's email addresses
public final void setEmails(VCardEmailCollection value)
Gets or sets a contact's email addresses
public final String getMailer()
Gets or sets a mailer
public final void setMailer(String value)
Gets or sets a mailer
public final String getTimeZone()
Gets or sets a timeZone
public final void setTimeZone(String value)
Gets or sets a timeZone
public final VCardGeo getGeo()
Gets or sets a global positioning
public final void setGeo(VCardGeo value)
Gets or sets a global positioning
public final VCardOrganization getOrganization()
Gets or sets an organization information
public final void setOrganization(VCardOrganization value)
Gets or sets an organization information
public final VCardExplanatoryInfo getExplanatoryInfo()
Gets or sets a vCard explanatory information
public final void setExplanatoryInfo(VCardExplanatoryInfo value)
Gets or sets a vCard explanatory information
public final VCardSecurity getSecurity()
Gets or sets a security properites
public final void setSecurity(VCardSecurity value)
Gets or sets a security properites
public final StringCollection getExtendedProperties()
Gets or sets an extended properties
public final void setExtendedProperties(StringCollection value)
Gets or sets an extended properties
public static VCardContact load(String filePath)
Reads VCardContact from the specified vCard file
The supported vCard versions are 2.1 and 3.0
filePath - A file name to read fromVCardContactArgumentException - filePath is null or emptypublic static VCardContact load(String filePath, Charset encoding)
Reads VCardContact from the specified vCard file
The supported vCard versions are 2.1 and 3.0
filePath - A file name to read fromencoding - File encodingVCardContactArgumentException - filePath is null or emptypublic static VCardContact load(InputStream stream)
Reads VCardContact from the specified stream containing vCard.
The supported vCard versions are 2.1 and 3.0
stream - A stream to read fromVCardContactArgumentNullException - stream is nullNotSupportedException - stream does not support readingpublic static VCardContact load(InputStream stream, Charset encoding)
Reads VCardContact from the specified stream containing vCard.
The supported vCard versions are 2.1 and 3.0
stream - A stream to read fromencoding - Stream data encodingVCardContactArgumentNullException - stream is nullNotSupportedException - stream does not support readingpublic static boolean isMultiContacts(String filePath)
Checks whether source file contains multi contacts.
filePath - Path to source filepublic static boolean isMultiContacts(InputStream stream)
Checks whether source stream contains multi contacts.
stream - Source streampublic static List<VCardContact> loadAsMultiple(InputStream stream)
Loads list of contacts from multi contact stream.
stream - Source stream@Deprecated public static List<VCardContact> loadAsMultiple(InputStream stream, Charset encoding)
Loads list of contacts from multi contact stream.
stream - Source streamencoding - Stream data encoding,if null then UTF8 will be used.public static List<VCardContact> loadAsMultiple(InputStream stream, VCardLoadOptions options)
Loads list of contacts from multi contact stream.
stream - Source streamoptions - Additional options when loading a VCardContactArgumentNullException - Throws if stream is nullNotSupportedException - Throws if the stream is not readablepublic static List<VCardContact> loadAsMultiple(String filePath)
Loads list of contacts from multi contact file.
filePath - Source file@Deprecated public static List<VCardContact> loadAsMultiple(String filePath, Charset encoding)
Loads list of contacts from multi contact file.
filePath - Source fileencoding - File data encoding,if null then UTF8 will be used.public static List<VCardContact> loadAsMultiple(String filePath, VCardLoadOptions options)
filePath - Source fileoptions - Additional options when loading a VCardContactArgumentException - Throws if filePath is null or emptypublic final void save(String filePath)
Saves this MapiContact to the vCard file with a default options.
The supported vCard version is 2.1
filePath - A vCard file nameArgumentException - filePath is null or emptypublic final void save(String filePath, int saveFormat)
Saves this MapiContact to the specified file with a format using the default options.
The supported save format is vCard.
filePath - A vCard file namesaveFormat - A save formatArgumentException - filePath is null or emptyNotSupportedException - the specified format is not supportedpublic final void save(String filePath, ContactSaveOptions saveOptions)
Saves this MapiContact into file using specified save options.
The supported save options is VCardSaveOptions
filePath - A vCard file namesaveOptions - A save optionsArgumentException - filePath is null or emptyArgumentNullException - saveOptions is nullNotSupportedException - some save option is not supportedpublic final void save(OutputStream stream)
Saves this MapiContact into the given stream with vCard format.
The supported vCard version is 2.1
stream - A stream to save toArgumentNullException - stream is nullNotSupportedException - stream does not support writingpublic final void save(OutputStream stream, int saveFormat)
Saves this MapiContact to the given stream with a format using the default options.
The supported save format is vCard
stream - A stream to save tosaveFormat - A save formatArgumentNullException - stream is nullNotSupportedException - stream does not support writingNotSupportedException - The specified format is not supportedpublic final void save(OutputStream stream, ContactSaveOptions saveOptions)
Saves this MapiContact to the given stream using specified save options.
The supported save options is VCardSaveOptions
stream - A stream to save tosaveOptions - A save optionsArgumentNullException - stream or saveOptions is nullNotSupportedException - stream does not support writingArgumentException - incorrect saveOptionsNotSupportedException - some save option is not supportedCopyright (c) 2008-2024 Aspose Pty Ltd. All Rights Reserved.