Package i2p.susi.util
Class Config
- java.lang.Object
-
- i2p.susi.util.Config
-
public class Config extends Object
Warning - static - not for use by multiple applications or prefixes- Author:
- susi
-
-
Constructor Summary
Constructors Constructor Description Config()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PropertiesgetProperties()Returns the properties, sorted, WITHOUT the prefixstatic StringgetProperty(String name)static intgetProperty(String name, int defaultValue)static StringgetProperty(String name, String defaultValue)static booleanhasConfigFile()Don't bother showing a reload config button if this returns false.static voidreloadConfiguration()static voidsaveConfiguration(Properties newProps)Saves the properties.static voidsetPrefix(String prefix)Static! Not for use by multiple applications!
-
-
-
Method Detail
-
hasConfigFile
public static boolean hasConfigFile()
Don't bother showing a reload config button if this returns false.- Since:
- 0.9.13
-
reloadConfiguration
public static void reloadConfiguration()
-
getProperties
public static Properties getProperties()
Returns the properties, sorted, WITHOUT the prefix- Since:
- 0.9.13
-
saveConfiguration
public static void saveConfiguration(Properties newProps) throws IOException
Saves the properties. A property not in newProps will be removed but will not override the default in the resource.- Parameters:
newProps- non-null WITHOUT the prefix- Throws:
IOException- Since:
- 0.9.13
-
getProperty
public static String getProperty(String name, String defaultValue)
- Parameters:
name-defaultValue-
-
getProperty
public static int getProperty(String name, int defaultValue)
- Parameters:
name-defaultValue-
-
setPrefix
public static void setPrefix(String prefix)
Static! Not for use by multiple applications!- Parameters:
prefix-
-
-