Package org.javlo.utils
Class ConfigurationProperties
- java.lang.Object
-
- org.javlo.utils.ConfigurationProperties
-
- Direct Known Subclasses:
StructuredConfigurationProperties
public class ConfigurationProperties extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected Propertiesprop
-
Constructor Summary
Constructors Constructor Description ConfigurationProperties()ConfigurationProperties(Properties prop)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProperty(String key, Object object)voidclear()voidclearProperty(String key)booleancontainsKey(String key)booleangetBoolean(String key)booleangetBoolean(String key, boolean defaultValue)DoublegetDouble(String key, double defaultValue)FilegetFile()FloatgetFloat(String key, float defaultValue)intgetInt(String key, int i)IntegergetInteger(String key)IntegergetInteger(String key, Integer defaultValue)IteratorgetKeys()longgetLong(String key, long i)PropertiesgetProperties()StringgetProperty(String key)StringgetString(String key)StringgetString(String key, String defaultValue)booleanisEmpty()voidload()voidload(File file)voidload(InputStream in)voidload(Reader reader)voidsave()voidsave(OutputStream outputStream)voidsetEncoding(String cHARACTER_ENCODING)voidsetFile(File dataFile)voidsetProperty(String key, boolean adminManagement)voidsetProperty(String key, int value)voidsetProperty(String key, Object value)voidsetProperty(String key, String value)
-
-
-
Field Detail
-
prop
protected Properties prop
-
-
Constructor Detail
-
ConfigurationProperties
public ConfigurationProperties()
-
ConfigurationProperties
public ConfigurationProperties(Properties prop)
-
-
Method Detail
-
load
public void load(File file) throws IOException
- Throws:
IOException
-
getFile
public File getFile()
-
getKeys
public Iterator getKeys()
-
clear
public void clear()
-
getProperties
public Properties getProperties()
-
getInt
public int getInt(String key, int i)
-
setProperty
public void setProperty(String key, int value)
-
getLong
public long getLong(String key, long i)
-
getBoolean
public boolean getBoolean(String key, boolean defaultValue)
-
save
public void save(OutputStream outputStream) throws IOException
- Throws:
IOException
-
setProperty
public void setProperty(String key, boolean adminManagement)
-
clearProperty
public void clearProperty(String key)
-
containsKey
public boolean containsKey(String key)
-
isEmpty
public boolean isEmpty()
-
setFile
public void setFile(File dataFile) throws IOException
- Throws:
IOException
-
save
public void save() throws IOException- Throws:
IOException
-
load
public void load(InputStream in) throws IOException
- Throws:
IOException
-
setEncoding
public void setEncoding(String cHARACTER_ENCODING)
-
load
public void load(Reader reader) throws IOException
- Throws:
IOException
-
getBoolean
public boolean getBoolean(String key)
-
load
public void load() throws IOException- Throws:
IOException
-
-