|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.huguesjohnson.IniFile
class IniFile
Constructor Summary | |
IniFile(java.lang.String fileName)
constructor |
Method Summary | |
void |
clear()
clears out property list |
java.lang.String |
getProperty(java.lang.String name,
java.lang.String defaultValue)
retrieves a property from memory, use read() to load all properties from file |
void |
read()
reads the file specified in the constuctor all data previously saved in memory is lost after read |
void |
save(java.lang.String header)
saves settings to file specfied in the constuctor - overwrites old file |
void |
setProperty(java.lang.String name,
boolean value)
sets a property in memory - use save() to write all properties to file |
void |
setProperty(java.lang.String name,
byte value)
sets a property in memory - use save() to write all properties to file |
void |
setProperty(java.lang.String name,
char value)
sets a property in memory - use save() to write all properties to file |
void |
setProperty(java.lang.String name,
double value)
sets a property in memory - use save() to write all properties to file |
void |
setProperty(java.lang.String name,
float value)
sets a property in memory - use save() to write all properties to file |
void |
setProperty(java.lang.String name,
int value)
sets a property in memory - use save() to write all properties to file |
void |
setProperty(java.lang.String name,
long value)
sets a property in memory - use save() to write all properties to file |
void |
setProperty(java.lang.String name,
java.lang.String value)
sets a property in memory - use save() to write all properties to file |
java.lang.String |
toString()
returns a String representation of this object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public IniFile(java.lang.String fileName)
fileName
- name of ini file to read/writeMethod Detail |
public void read()
public void save(java.lang.String header)
header
- header for ini filepublic void clear()
public void setProperty(java.lang.String name, java.lang.String value)
name
- name (key) of the settingvalue
- value of the settingpublic void setProperty(java.lang.String name, int value)
name
- name (key) of the settingvalue
- value of the settingpublic void setProperty(java.lang.String name, boolean value)
name
- name (key) of the settingvalue
- value of the settingpublic void setProperty(java.lang.String name, long value)
name
- name (key) of the settingvalue
- value of the settingpublic void setProperty(java.lang.String name, float value)
name
- name (key) of the settingvalue
- value of the settingpublic void setProperty(java.lang.String name, double value)
name
- name (key) of the settingvalue
- value of the settingpublic void setProperty(java.lang.String name, char value)
name
- name (key) of the settingvalue
- value of the settingpublic void setProperty(java.lang.String name, byte value)
name
- name (key) of the settingvalue
- value of the settingpublic java.lang.String getProperty(java.lang.String name, java.lang.String defaultValue)
name
- name (key) of the property to retrievedefaultValue
- value to return if property is not foundpublic java.lang.String toString()
toString
in class java.lang.Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |