Package esmska.persistence
Class ExportManager
- java.lang.Object
-
- esmska.persistence.ExportManager
-
public class ExportManager extends java.lang.ObjectExport program data
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidexportContacts(java.util.Collection<Contact> contacts, java.io.OutputStream out)Export contacts to csv formatstatic voidexportContactsToVCard(java.util.Collection<Contact> contacts, java.io.OutputStream out)Export contacts to vCard formatstatic voidexportGateway(java.lang.String scriptContents, byte[] icon, java.io.OutputStream scriptOut, java.io.OutputStream iconOut)Export gateway script and iconstatic voidexportGatewayProperties(java.util.Collection<Gateway> gateways, java.util.Collection<Signature> signatures, Signature defaultSignature, java.io.OutputStream out)Export gateway propertiesstatic voidexportHistory(java.util.Collection<History.Record> history, java.io.OutputStream out)Export sms historystatic voidexportKeyring(Keyring keyring, java.io.OutputStream out)Export keyringstatic voidexportQueue(java.util.Collection<SMS> queue, java.io.OutputStream out)Export sms queue
-
-
-
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 nullout- 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 nullout- output stream, not null- Throws:
java.io.IOExceptiona_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 nullout- 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 nullout- 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 nullout- 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.IOExceptionExport gateway script and icon- Parameters:
scriptContents- gateway script contents, not null nor emptyicon- gateway icon, may be nullscriptOut- output stream for gateway script, not nulliconOut- output stream for gateway icon, mustn't be null ificonis 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 savesignatures- all available signatures, not nulldefaultSignature- the default signature, not nullout- output stream, not null- Throws:
java.io.IOException
-
-