Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

org.openmobileis.synchro.openmsp.client.db.DBImportFileCoder Class Reference

List of all members.

Detailed Description

Title: OpenMobileIS project source
Description: Utility methode to encode and decode rows for the synchro protocol.

Author:
Philippe Delrieu
Since:
JDK 1.1
Version:
1.0.

Definition at line 42 of file DBImportFileCoder.java.

Public Member Functions

char[] encodeData (char action, String[] rowData) throws OpenMSPException
 encode the specified row data and action in a char array that can be decoded.
String formateString (String data)
String removeAntiSlash (String input)
void decodeFileData (String filename, DecodedRowListener listener) throws OpenMSPException
 decode the specified file and notify the specified listener when a row is decoded.
String cleanAndFormatStringforDB (String toFormat)
String decodeString (String inputString)
String encodeInString (String inputString)
String[] decodeData (String data)
 decode the specified data into a String array.
String convertBooleanToDBData (boolean bool)
boolean convertDBDataToBoolean (byte data)
String[] serializeDBObject (String uid, Object obj) throws IOException
Object unserializeDBObject (String[] synchroData) throws IOException, ClassNotFoundException

Static Public Member Functions

static DBImportFileCoder getCoder ()
static void main (String[] args)

Public Attributes

char guillemetannulator = '\\'

Static Public Attributes

static final char ADDAction = 'A'
static final char REPLACEAction = 'R'
static final char DELETEAction = 'D'
static final char endLine = '\n'
static final char dataSeparator = ';'
static final char stringSeparator = '\''
static final char antislashSeparator = '\\'


Member Function Documentation

String [] org.openmobileis.synchro.openmsp.client.db.DBImportFileCoder.decodeData String  data  ) 
 

decode the specified data into a String array.

The specified String is the string encoded by the encode method. The action specified in the string is not return. if an error occurs return null;

Definition at line 272 of file DBImportFileCoder.java.

References org.openmobileis.common.util.collection.Array.add(), org.openmobileis.synchro.openmsp.client.db.DBImportFileCoder.antislashSeparator, org.openmobileis.synchro.openmsp.client.db.DBImportFileCoder.dataSeparator, org.openmobileis.synchro.openmsp.client.db.DBImportFileCoder.endLine, org.openmobileis.common.util.collection.Array.size, org.openmobileis.synchro.openmsp.client.db.DBImportFileCoder.stringSeparator, and org.openmobileis.common.util.collection.Array.toArray().

char [] org.openmobileis.synchro.openmsp.client.db.DBImportFileCoder.encodeData char  action,
String[]  rowData
throws OpenMSPException
 

encode the specified row data and action in a char array that can be decoded.

String row data must be well formated with cote delimiter :ex tutu => 'tutu'

Definition at line 75 of file DBImportFileCoder.java.

References org.openmobileis.synchro.openmsp.client.db.DBImportFileCoder.dataSeparator, and org.openmobileis.synchro.openmsp.client.db.DBImportFileCoder.endLine.


The documentation for this class was generated from the following file:
Generated on Wed Dec 14 21:05:40 2005 for OpenMobileIS by  doxygen 1.4.4