public class DataUtils
extends java.lang.Object
Constructor and Description |
---|
DataUtils() |
Modifier and Type | Method and Description |
---|---|
static ConfigFile |
createDataFile(java.lang.String path,
java.lang.String extension)
Creates an instance of the DataFile class
|
static ListFile |
createListFile(java.lang.String path,
java.lang.String extension)
Creates an instance of the ListFile class
|
static MapFile |
createMapFile(java.lang.String path,
java.lang.String extension)
Creates an instance of the MapFile class
|
static java.lang.Object |
deserialize(java.lang.String path,
java.lang.String extension)
Deserializes an object from a file
|
static boolean |
fileExists(java.lang.String path,
java.lang.String extension)
Checks if the specified file exists
|
static void |
serialize(java.lang.Object object,
java.lang.String path,
java.lang.String extension)
Serializes an object
|
public static void serialize(java.lang.Object object, java.lang.String path, java.lang.String extension)
object
- The object to serializepath
- The path to the new fileextension
- The extension of the new file excluding the periodpublic static java.lang.Object deserialize(java.lang.String path, java.lang.String extension)
path
- The path to the fileextension
- The extension of the file excluding the periodpublic static boolean fileExists(java.lang.String path, java.lang.String extension)
path
- The path of the fileextension
- The extension of the file excluding the periodpublic static ConfigFile createDataFile(java.lang.String path, java.lang.String extension)
path
- The path to the new, or existing fileextension
- The extension of the file excluding the periodpublic static ListFile createListFile(java.lang.String path, java.lang.String extension)
path
- The path to the new, or existing fileextension
- The extension of the file excluding the periodpublic static MapFile createMapFile(java.lang.String path, java.lang.String extension)
path
- The path to the new, or existing fileextension
- The extension of the file excluding the period