public class XML extends FileDataType
DEBUG_SERIALIZATION, fileLock, location, NEWLINE| Modifier and Type | Method and Description |
|---|---|
Object |
deserializeArray(Object array) |
Map<String,Object> |
getRoot()
The root node of this
FileDataType |
protected Map<String,Object> |
newSection() |
protected Map<String,Object> |
readRaw(File target)
Reads all the information currently saved in the file, disregarding
any changes in memory
|
void |
save()
Saves any information in memory to the file it was loaded from.
|
void |
save(File target)
Saves any information in memory to the file specified.
|
Object |
serializeArray(Object array) |
Object |
serializeMap(Map<String,Object> toFileFormat) |
protected String |
toString(Map<String,Object> section) |
deserializeMap, fromString, get, get, getMutable, getMutable, isSet, newInstance, parseDeserializable, parseSerializable, readRaw, serializationCopy, setpublic XML(File location)
public XML()
public void save()
throws IOException
FileDataTypesave in class FileDataTypeIOException - Any read/write locks or permission errors on the filepublic void save(File target) throws IOException
FileDataTypesave in class FileDataTypetarget - The file to save toIOException - Any read/write locks or permission errors on the fileprotected Map<String,Object> readRaw(File target) throws IOException
FileDataTypereadRaw in class FileDataTypetarget - The File to be readMap<String, Object> value of the target File
This method must return an empty Map<String, Object> if the
file is empty or a reader returns null.IOException - If the file could not be readpublic Object serializeMap(Map<String,Object> toFileFormat)
serializeMap in class FileDataTypepublic Object serializeArray(Object array)
serializeArray in class FileDataTypepublic Object deserializeArray(Object array)
deserializeArray in class FileDataTypeprotected Map<String,Object> newSection()
newSection in class FileDataTypepublic Map<String,Object> getRoot()
FileDataTypeFileDataTypegetRoot in class FileDataTypeMap that represents this FileDataTypeCopyright © 2017. All rights reserved.