|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gjt.sp.jedit.SettingsXML
public class SettingsXML
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.
| Nested Class Summary | |
|---|---|
class |
SettingsXML.Saver
A Writer to write XML for saving. |
| Constructor Summary | |
|---|---|
SettingsXML(java.io.File f)
|
|
SettingsXML(java.lang.String settingsDirectory,
java.lang.String name)
Construct a SettingsXML with specific location and name. |
|
| Method Summary | |
|---|---|
boolean |
fileExists()
Returns true if the file exists. |
boolean |
hasChangedOnDisk()
Returns true if the file has been changed on disk. |
void |
load(org.xml.sax.helpers.DefaultHandler handler)
Parse the XML file to load. |
SettingsXML.Saver |
openSaver()
Open the file to save in XML. |
java.lang.String |
toString()
Returns the file's path. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SettingsXML(java.lang.String settingsDirectory,
java.lang.String name)
settingsDirectory - The settings directory of jeditname - The file name will be (name + ".xml")public SettingsXML(java.io.File f)
| Method Detail |
|---|
public boolean fileExists()
public void load(org.xml.sax.helpers.DefaultHandler handler)
throws java.io.IOException
handler - The handler to receive SAX notifications.
java.io.IOException
public SettingsXML.Saver openSaver()
throws java.io.IOException
java.io.IOExceptionpublic boolean hasChangedOnDisk()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||