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 Properties
prop
-
Constructor Summary
Constructors Constructor Description ConfigurationProperties()
ConfigurationProperties(Properties prop)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProperty(String key, Object object)
void
clear()
void
clearProperty(String key)
boolean
containsKey(String key)
boolean
getBoolean(String key)
boolean
getBoolean(String key, boolean defaultValue)
Double
getDouble(String key, double defaultValue)
File
getFile()
Float
getFloat(String key, float defaultValue)
int
getInt(String key, int i)
Integer
getInteger(String key)
Integer
getInteger(String key, Integer defaultValue)
Iterator
getKeys()
long
getLong(String key, long i)
Properties
getProperties()
String
getProperty(String key)
String
getString(String key)
String
getString(String key, String defaultValue)
boolean
isEmpty()
void
load()
void
load(File file)
void
load(InputStream in)
void
load(Reader reader)
void
save()
void
save(OutputStream outputStream)
void
setEncoding(String cHARACTER_ENCODING)
void
setFile(File dataFile)
void
setProperty(String key, boolean adminManagement)
void
setProperty(String key, int value)
void
setProperty(String key, Object value)
void
setProperty(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
-
-