fr.emn.reactiveinput.utils
Class FilesUtilities

java.lang.Object
  extended byfr.emn.reactiveinput.utils.FilesUtilities

public class FilesUtilities
extends java.lang.Object


Field Summary
static java.lang.String VALIDATE_NOT_LIST
           
static java.lang.String VALIDATE_NULL_DATA
           
static java.lang.String VALIDATE_VALIDATED
           
static java.lang.String VALIDATE_WRONG_ELEMENT
           
static java.lang.String VALIDATE_WRONG_FIRST
           
static java.lang.String VALIDATE_WRONG_SECOND
           
static java.lang.String VALIDATE_WRONG_SIZE
           
 
Constructor Summary
FilesUtilities()
           
 
Method Summary
static java.util.LinkedList loadDInputRecorderData(java.io.File f)
          Loads DInputRecorder data contained in the given file.
static java.util.LinkedList loadDInputRecorderData(java.lang.String str)
          Loads DInputRecorder data contained in the file pointed by the given path.
static boolean saveDInputRecorderData(java.lang.Object data, java.lang.String str)
          Saves DInputRecorder data, using a simple XML zipped file format.
static java.lang.String validateInputRecorderData(java.lang.Object data)
          Validates given data as correct inputRecorder events list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALIDATE_VALIDATED

public static final java.lang.String VALIDATE_VALIDATED
See Also:
Constant Field Values

VALIDATE_NULL_DATA

public static final java.lang.String VALIDATE_NULL_DATA
See Also:
Constant Field Values

VALIDATE_NOT_LIST

public static final java.lang.String VALIDATE_NOT_LIST
See Also:
Constant Field Values

VALIDATE_WRONG_SIZE

public static final java.lang.String VALIDATE_WRONG_SIZE
See Also:
Constant Field Values

VALIDATE_WRONG_FIRST

public static final java.lang.String VALIDATE_WRONG_FIRST
See Also:
Constant Field Values

VALIDATE_WRONG_SECOND

public static final java.lang.String VALIDATE_WRONG_SECOND
See Also:
Constant Field Values

VALIDATE_WRONG_ELEMENT

public static final java.lang.String VALIDATE_WRONG_ELEMENT
See Also:
Constant Field Values
Constructor Detail

FilesUtilities

public FilesUtilities()
Method Detail

saveDInputRecorderData

public static boolean saveDInputRecorderData(java.lang.Object data,
                                             java.lang.String str)
Saves DInputRecorder data, using a simple XML zipped file format.

Parameters:
data - the data to be saved
str - filename for saving data
Returns:
true if operation succeed, false otherwise

loadDInputRecorderData

public static java.util.LinkedList loadDInputRecorderData(java.lang.String str)
Loads DInputRecorder data contained in the file pointed by the given path.

Parameters:
str - path of the file containing data to load
Returns:
a strokes set in a LinkedList. Could be null if there was an error

loadDInputRecorderData

public static java.util.LinkedList loadDInputRecorderData(java.io.File f)
                                                   throws javax.xml.parsers.ParserConfigurationException,
                                                          java.io.IOException,
                                                          org.xml.sax.SAXException,
                                                          java.lang.ClassNotFoundException
Loads DInputRecorder data contained in the given file.

Parameters:
f - the data to load
Returns:
a strokes set in a LinkedList. Could be null if there was an error
Throws:
javax.xml.parsers.ParserConfigurationException
java.io.IOException
org.xml.sax.SAXException
java.lang.ClassNotFoundException

validateInputRecorderData

public static java.lang.String validateInputRecorderData(java.lang.Object data)
Validates given data as correct inputRecorder events list.

Parameters:
data - data to check
Returns:
true if the given data is an inputRecorder events list, false otherwise