SortedProperties

Sorted properties file. This implementation requires that store() internally calls keys().

Methods
static SortedProperties fromLines(String s)
Convert a String to a map.
static SortedProperties fromLines(String s)
Convert a String to a map.
Parameters:
s - the string
Returns:
the map
static boolean getBooleanProperty(Properties prop, String key, boolean def)
Get a boolean property value from a properties object.
static boolean getBooleanProperty(Properties prop, String key, boolean def)
Get a boolean property value from a properties object.
Parameters:
prop - the properties object
key - the key
def - the default value
Returns:
the value if set, or the default value if not
static int getIntProperty(Properties prop, String key, int def)
Get an int property value from a properties object.
static int getIntProperty(Properties prop, String key, int def)
Get an int property value from a properties object.
Parameters:
prop - the properties object
key - the key
def - the default value
Returns:
the value if set, or the default value if not
static SortedProperties loadProperties(String fileName)
Load a properties object from a file.
static SortedProperties loadProperties(String fileName) throws IOException
Load a properties object from a file.
Parameters:
fileName - the name of the properties file
Returns:
the properties object
Enumeration keys()
Enumeration keys()
void store(String fileName)
Store a properties file.
void store(String fileName) throws IOException
Store a properties file. The header and the date is not written.
Parameters:
fileName - the target file name
String toLines()
Convert the map to a list of line in the form key=value.
String toLines()
Convert the map to a list of line in the form key=value.
Returns:
the lines