Class ExportManager


  • public class ExportManager
    extends java.lang.Object
    Export program data
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void exportContacts​(java.util.Collection<Contact> contacts, java.io.OutputStream out)
      Export contacts to csv format
      static void exportContactsToVCard​(java.util.Collection<Contact> contacts, java.io.OutputStream out)
      Export contacts to vCard format
      static void exportGateway​(java.lang.String scriptContents, byte[] icon, java.io.OutputStream scriptOut, java.io.OutputStream iconOut)
      Export gateway script and icon
      static void exportGatewayProperties​(java.util.Collection<Gateway> gateways, java.util.Collection<Signature> signatures, Signature defaultSignature, java.io.OutputStream out)
      Export gateway properties
      static void exportHistory​(java.util.Collection<History.Record> history, java.io.OutputStream out)
      Export sms history
      static void exportKeyring​(Keyring keyring, java.io.OutputStream out)
      Export keyring
      static void exportQueue​(java.util.Collection<SMS> queue, java.io.OutputStream out)
      Export sms queue
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • exportContacts

        public static void exportContacts​(java.util.Collection<Contact> contacts,
                                          java.io.OutputStream out)
                                   throws java.io.IOException
        Export contacts to csv format
        Parameters:
        contacts - contacts, not null
        out - output stream, not null
        Throws:
        java.io.IOException
      • exportContactsToVCard

        public static void exportContactsToVCard​(java.util.Collection<Contact> contacts,
                                                 java.io.OutputStream out)
                                          throws java.io.IOException,
                                                 a_vcard.android.syncml.pim.vcard.VCardException
        Export contacts to vCard format
        Parameters:
        contacts - contacts, not null
        out - output stream, not null
        Throws:
        java.io.IOException
        a_vcard.android.syncml.pim.vcard.VCardException
      • exportQueue

        public static void exportQueue​(java.util.Collection<SMS> queue,
                                       java.io.OutputStream out)
                                throws java.io.IOException
        Export sms queue
        Parameters:
        queue - queue, not null
        out - output stream, not null
        Throws:
        java.io.IOException
      • exportHistory

        public static void exportHistory​(java.util.Collection<History.Record> history,
                                         java.io.OutputStream out)
                                  throws java.io.IOException
        Export sms history
        Parameters:
        history - history, not null
        out - output stream, not null
        Throws:
        java.io.IOException
      • exportKeyring

        public static void exportKeyring​(Keyring keyring,
                                         java.io.OutputStream out)
                                  throws java.io.IOException,
                                         java.security.GeneralSecurityException
        Export keyring
        Parameters:
        keyring - keyring to export, not null
        out - output stream, not null
        Throws:
        java.io.IOException - When some error occur during file processing.
        java.security.GeneralSecurityException - When there is problem with key encryption.
      • exportGateway

        public static void exportGateway​(java.lang.String scriptContents,
                                         byte[] icon,
                                         java.io.OutputStream scriptOut,
                                         java.io.OutputStream iconOut)
                                  throws java.io.IOException
        Export gateway script and icon
        Parameters:
        scriptContents - gateway script contents, not null nor empty
        icon - gateway icon, may be null
        scriptOut - output stream for gateway script, not null
        iconOut - output stream for gateway icon, mustn't be null if icon is not null
        Throws:
        java.io.IOException - if there was some problem with saving data
      • exportGatewayProperties

        public static void exportGatewayProperties​(java.util.Collection<Gateway> gateways,
                                                   java.util.Collection<Signature> signatures,
                                                   Signature defaultSignature,
                                                   java.io.OutputStream out)
                                            throws java.io.IOException
        Export gateway properties
        Parameters:
        gateways - all gateways for which the properties to save
        signatures - all available signatures, not null
        defaultSignature - the default signature, not null
        out - output stream, not null
        Throws:
        java.io.IOException