|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavazoom.jlgui.player.amp.util.ini.Configuration
public class Configuration
A Configuration is used to save a set of configuration properties. The properties can be written out to disk in "name=value" form, and read back in.
Constructor Summary | |
---|---|
Configuration()
Constructs a new Configuration object that doesn't have a file associated with it. |
|
Configuration(java.io.File config_file)
Constructs a new Configuration object that stores it's properties in the given file. |
|
Configuration(java.lang.String file_name)
Constructs a new Configuration object that stores it's properties in the file with the given name. |
|
Configuration(java.net.URL config_file)
Constructs a new Configuration object that stores it's properties in the given file. |
Method Summary | |
---|---|
void |
add(java.lang.String name,
boolean value)
Adds the boolean property. |
void |
add(java.lang.String name,
double value)
Adds the double property. |
void |
add(java.lang.String name,
int value)
Adds the integer property. |
void |
add(java.lang.String name,
java.lang.String value)
Adds a the property with the given name and value. |
java.lang.String |
get(java.lang.String name)
Returns the value of the property with the given name. |
java.lang.String |
get(java.lang.String name,
java.lang.String default_value)
Returns the value of the property with the given name. |
boolean |
getBoolean(java.lang.String name)
Returns the value of the property with the given name. |
boolean |
getBoolean(java.lang.String name,
boolean default_value)
Returns the value of the property with the given name. |
java.io.File |
getConfigFile()
|
double |
getDouble(java.lang.String name)
Returns the value of the property with the given name |
double |
getDouble(java.lang.String name,
double default_value)
Returns the value of the property with the given name. |
int |
getInt(java.lang.String name)
Returns the value of the property with the given name |
int |
getInt(java.lang.String name,
int default_value)
Returns the value of the property with the given name. |
boolean |
isValidCRC()
|
boolean |
load()
Loads the property list from the configuration file. |
boolean |
load(java.io.BufferedReader buffy)
|
void |
remove(java.lang.String name)
Removes the property with the given name. |
void |
removeAll()
Removes all the properties. |
boolean |
save()
Saves the property list to the config file. |
boolean |
save(java.io.PrintWriter out)
|
void |
storeCRC()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Configuration(java.lang.String file_name)
public Configuration(java.io.File config_file)
public Configuration(java.net.URL config_file)
public Configuration()
Method Detail |
---|
public java.io.File getConfigFile()
public void add(java.lang.String name, java.lang.String value)
name
- The name of the property.value
- The value of the property.public void add(java.lang.String name, boolean value)
name
- The name of the property.value
- The value of the property.public void add(java.lang.String name, int value)
name
- The name of the property.value
- The value of the property.public void add(java.lang.String name, double value)
name
- The name of the property.value
- The value of the property.public java.lang.String get(java.lang.String name)
The
- name of the desired property.
public java.lang.String get(java.lang.String name, java.lang.String default_value)
The
- name of the desired property.default_value
- The default value of the property which is returned
if the property does not have a specified value.
public boolean getBoolean(java.lang.String name)
name
- The name of the desired property.return
- The value of the property.public boolean getBoolean(java.lang.String name, boolean default_value)
name
- The name of the desired property.default_value
- The default value of the property which is returned
if the property does not have a specified value.return
- The value of the property.public int getInt(java.lang.String name)
name
- The name of the desired property.return
- The value of the property.public int getInt(java.lang.String name, int default_value)
name
- The name of the desired property.default_value
- The default value of the property which is returned
if the property does not have a specified value.return
- The value of the property.public double getDouble(java.lang.String name)
name
- The name of the desired property.return
- The value of the property.public double getDouble(java.lang.String name, double default_value)
name
- The name of the desired property.default_value
- The default value of the property which is returned
if the property does not have a specified value.return
- The value of the property.public void remove(java.lang.String name)
name
- The name of the property to remove.public void removeAll()
public boolean load()
public boolean load(java.io.BufferedReader buffy) throws java.io.IOException
java.io.IOException
public boolean save()
public boolean save(java.io.PrintWriter out) throws java.io.IOException
java.io.IOException
public void storeCRC()
public boolean isValidCRC()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |