com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class VCardContact



  • public final class VCardContact
    extends Object

    Represents a vCard contact

    • Constructor Detail

      • VCardContact

        public VCardContact()

        Initializes a new instance of the VCardContact class

    • Method Detail

      • getMailer

        public String getMailer()

        Gets or sets a mailer

        Returns:
        a String object.
      • setMailer

        public void setMailer(String value)

        Gets or sets a mailer

        Parameters:
        value - a String object.
      • getTimeZone

        public String getTimeZone()

        Gets or sets a timeZone

        Returns:
        a String object.
      • setTimeZone

        public void setTimeZone(String value)

        Gets or sets a timeZone

        Parameters:
        value - a String object.
      • getGeo

        public VCardGeo getGeo()

        Gets or sets a global positioning

        Returns:
        a VCardGeo object.
      • setGeo

        public void setGeo(VCardGeo value)

        Gets or sets a global positioning

        Parameters:
        value - a VCardGeo object.
      • setSecurity

        public void setSecurity(VCardSecurity value)

        Gets or sets a security properites

        Parameters:
        value - a VCardSecurity object.
      • getExtendedProperties

        public com.aspose.ms.System.Collections.Specialized.StringCollection getExtendedProperties()

        Gets or sets an extended properties

        Returns:
        a StringCollection object.
      • setExtendedProperties

        public void setExtendedProperties(com.aspose.ms.System.Collections.Specialized.StringCollection value)

        Gets or sets an extended properties

        Parameters:
        value - a StringCollection object.
      • load

        public static VCardContact load(String filePath)

        Reads VCardContact from the specified vCard file The supported vCard versions are 2.1 and 3.0

        Parameters:
        filePath - A file name to read from
        Returns:
        A read VCardContact
        Throws:
        com.aspose.ms.System.ArgumentException - filePath is null or empty
      • load

        public static VCardContact load(String filePath,
                        Charset encoding)

        Reads VCardContact from the specified vCard file The supported vCard versions are 2.1 and 3.0

        Parameters:
        filePath - A file name to read from
        encoding - File encoding
        Returns:
        A read VCardContact
        Throws:
        com.aspose.ms.System.ArgumentException - filePath is null or empty
      • load

        public static VCardContact load(InputStream stream)

        Reads VCardContact from the specified stream containing vCard. The supported vCard versions are 2.1 and 3.0

        Parameters:
        stream - A stream to read from
        Returns:
        A read VCardContact
        Throws:
        com.aspose.ms.System.ArgumentNullException - stream is null
        com.aspose.ms.System.NotSupportedException - stream does not support reading
      • load

        public 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

        Parameters:
        stream - A stream to read from
        encoding - Stream data encoding
        Returns:
        A read VCardContact
        Throws:
        com.aspose.ms.System.ArgumentNullException - stream is null
        com.aspose.ms.System.NotSupportedException - stream does not support reading
      • save

        public void save(String filePath)

        Saves this MapiContact to the vCard file with a default options. The supported vCard version is 2.1

        Parameters:
        filePath - A vCard file name
        Throws:
        com.aspose.ms.System.ArgumentException - filePath is null or empty
      • save

        public 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.

        Parameters:
        filePath - A vCard file name
        saveFormat - A save format
        Throws:
        com.aspose.ms.System.ArgumentException - filePath is null or empty
        com.aspose.ms.System.NotSupportedException - the specified format is not supported
      • save

        public void save(String filePath,
                ContactSaveOptions saveOptions)

        Saves this MapiContact into file using specified save options. The supported save options is VCardSaveOptions

        Parameters:
        filePath - A vCard file name
        saveOptions - A save options
        Throws:
        com.aspose.ms.System.ArgumentException - filePath is null or empty
        com.aspose.ms.System.ArgumentNullException - saveOptions is null
        com.aspose.ms.System.NotSupportedException - some save option is not supported
      • save

        public void save(OutputStream stream)

        Saves this MapiContact into the given stream with vCard format. The supported vCard version is 2.1

        Parameters:
        stream - A stream to save to
        Throws:
        com.aspose.ms.System.ArgumentNullException - stream is null
        com.aspose.ms.System.NotSupportedException - stream does not support writing
      • save

        public 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

        Parameters:
        stream - A stream to save to
        saveFormat - A save format
        Throws:
        com.aspose.ms.System.ArgumentNullException - stream is null
        com.aspose.ms.System.NotSupportedException - stream does not support writing
        com.aspose.ms.System.NotSupportedException - The specified format is not supported
      • save

        public void save(OutputStream stream,
                ContactSaveOptions saveOptions)

        Saves this MapiContact to the given stream using specified save options. The supported save options is VCardSaveOptions

        Parameters:
        stream - A stream to save to
        saveOptions - A save options
        Throws:
        com.aspose.ms.System.ArgumentNullException - stream or saveOptions is null
        com.aspose.ms.System.NotSupportedException - stream does not support writing
        com.aspose.ms.System.ArgumentException - incorrect saveOptions
        com.aspose.ms.System.NotSupportedException - some save option is not supported