public class PropertiesEx
extends java.util.Properties
| Constructor and Description |
|---|
PropertiesEx() |
| Modifier and Type | Method and Description |
|---|---|
void |
loadPropertiesFile(java.io.File file)
Loads properties from a file.
|
void |
loadPropertiesFile(java.lang.String file)
Loads properties from a file.
|
void |
loadPropertiesFile(java.lang.String path,
java.lang.String file)
Loads properties from a file.
|
void |
savePropertiesFile(java.io.File file,
java.lang.String header)
Saves properties to a file.
|
void |
savePropertiesFile(java.lang.String file,
java.lang.String header)
Saves properties to a file.
|
java.lang.Object |
setProperty(java.lang.String name,
java.lang.String value)
Sets the value of a property in the property list.
|
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, store, store, storeToXML, storeToXML, stringPropertyNamespublic void loadPropertiesFile(java.io.File file)
throws java.io.IOException,
java.io.FileNotFoundException
file - The file to loadjava.io.IOExceptionjava.io.FileNotFoundExceptionloadPropertiesFile(String),
loadPropertiesFile(String, String),
Properties.load(java.io.Reader)public void loadPropertiesFile(java.lang.String file)
throws java.io.IOException,
java.io.FileNotFoundException
file - The full path and name of the file to loadjava.io.IOExceptionjava.io.FileNotFoundExceptionloadPropertiesFile(File),
loadPropertiesFile(String, String),
Properties.load(java.io.Reader)public void loadPropertiesFile(java.lang.String path,
java.lang.String file)
throws java.io.IOException,
java.io.FileNotFoundException
path - The path of the file to loadfile - The name of the file to loadjava.io.IOExceptionjava.io.FileNotFoundExceptionloadPropertiesFile(File),
loadPropertiesFile(String),
Properties.load(java.io.Reader)public void savePropertiesFile(java.io.File file,
java.lang.String header)
throws java.io.IOException
file - The file to saveheader - A text comment which is used as a header in the filejava.io.IOExceptionsavePropertiesFile(String, String),
Properties.save(java.io.OutputStream, java.lang.String)public void savePropertiesFile(java.lang.String file,
java.lang.String header)
throws java.io.IOException
file - The full path and name of the file to saveheader - A text comment which is used as a header in the filejava.io.IOExceptionsavePropertiesFile(File, String),
Properties.save(java.io.OutputStream, java.lang.String)public java.lang.Object setProperty(java.lang.String name,
java.lang.String value)
setProperty in class java.util.Propertiesname - Name of the propertyvalue - Value of the propertyProperties.getProperty(java.lang.String),
Hashtable.put(K, V)