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, set
public XML(File location)
public XML()
public void save() throws IOException
FileDataType
save
in class FileDataType
IOException
- Any read/write locks or permission errors on the filepublic void save(File target) throws IOException
FileDataType
save
in class FileDataType
target
- The file to save toIOException
- Any read/write locks or permission errors on the fileprotected Map<String,Object> readRaw(File target) throws IOException
FileDataType
readRaw
in class FileDataType
target
- 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 FileDataType
public Object serializeArray(Object array)
serializeArray
in class FileDataType
public Object deserializeArray(Object array)
deserializeArray
in class FileDataType
protected Map<String,Object> newSection()
newSection
in class FileDataType
public Map<String,Object> getRoot()
FileDataType
FileDataType
getRoot
in class FileDataType
Map
that represents this FileDataType
Copyright © 2017. All rights reserved.