play.utils
Class Properties
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,String>
play.utils.Properties
- All Implemented Interfaces:
- Serializable, Cloneable, Map<String,String>
public class Properties
- extends HashMap<String,String>
like Properties, but with:
encoding
generic
type helper
- See Also:
- Serialized Form
|
Method Summary |
String |
get(String key,
String defaultValue)
|
boolean |
getBoolean(String key)
|
boolean |
getBoolean(String key,
boolean defval)
|
Object |
getClassInstance(String key)
|
Object |
getClassInstance(String key,
Object defaultinstance)
|
double |
getDouble(String key)
|
double |
getDouble(String key,
long defval)
|
float |
getFloat(String key)
|
float |
getFloat(String key,
float defval)
|
int |
getInt(String key)
|
int |
getInt(String key,
int defval)
|
long |
getLong(String key)
|
long |
getLong(String key,
long defval)
|
URL |
getURL(String key)
|
void |
load(InputStream is)
|
void |
load(InputStream is,
String encoding)
|
void |
setDouble(String key,
double val)
|
void |
setFloat(String key,
float val)
|
void |
setInt(String key,
int val)
|
void |
setLong(String key,
long val)
|
void |
store(OutputStream out)
|
void |
store(OutputStream out,
String encoding)
|
| Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
Properties
public Properties()
load
public void load(InputStream is)
throws IOException
- Throws:
IOException
load
public void load(InputStream is,
String encoding)
throws IOException
- Throws:
IOException
get
public String get(String key,
String defaultValue)
store
public void store(OutputStream out)
throws IOException
- Throws:
IOException
store
public void store(OutputStream out,
String encoding)
throws IOException
- Throws:
IOException
getBoolean
public boolean getBoolean(String key)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
getBoolean
public boolean getBoolean(String key,
boolean defval)
getClassInstance
public Object getClassInstance(String key)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
getClassInstance
public Object getClassInstance(String key,
Object defaultinstance)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
getDouble
public double getDouble(String key)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
getDouble
public double getDouble(String key,
long defval)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
setDouble
public void setDouble(String key,
double val)
getFloat
public float getFloat(String key)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
getFloat
public float getFloat(String key,
float defval)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
setFloat
public void setFloat(String key,
float val)
getInt
public int getInt(String key)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
getInt
public int getInt(String key,
int defval)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
setInt
public void setInt(String key,
int val)
getLong
public long getLong(String key)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
getLong
public long getLong(String key,
long defval)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
setLong
public void setLong(String key,
long val)
getURL
public URL getURL(String key)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly