| |
|
| java.lang.Object org.gjt.sp.jedit.SettingsXML
SettingsXML | class SettingsXML (Code) | | A XML file in the settings directory.
This class provides some common operations to load/save settings
from/into a XML file.
- Proper encoding and XML declaration.
- Two stage save.
- Making backup on each save.
- Detection of change on disk.
|
Constructor Summary | |
public | SettingsXML(String settingsDirectory, String name) Construct a SettingsXML with specific location and name. |
SettingsXML | public SettingsXML(String settingsDirectory, String name)(Code) | | Construct a SettingsXML with specific location and name.
Parameters: settingsDirectory - The settings directory of jedit Parameters: name - The file name will be (name + ".xml") |
fileExists | public boolean fileExists()(Code) | | Returns true if the file exists.
|
hasChangedOnDisk | public boolean hasChangedOnDisk()(Code) | | Returns true if the file has been changed on disk.
This is based on the last modified time at the last saving
or loading.
|
load | public void load(DefaultHandler handler) throws IOException(Code) | | Parse the XML file to load.
Parameters: handler - The handler to receive SAX notifications. |
openSaver | public Saver openSaver() throws IOException(Code) | | Open the file to save in XML.
|
toString | public String toString()(Code) | | Returns the file's path.
|
|
|
|