|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.util.Dictionary
java.util.Hashtable
java.util.Properties
org.blojsom.util.BlojsomProperties
BlojsomProperties
Saving properties in non-ISO encodings, based on java.util.Properties
| Field Summary |
| Fields inherited from class java.util.Properties |
defaults |
| Constructor Summary | |
BlojsomProperties()
Properties class extension with customizable encoding support. |
|
BlojsomProperties(boolean allowMultipleValues)
Properties class extension with customizable encoding support. |
|
BlojsomProperties(java.util.Properties defaults)
Properties class extension with customizable encoding support. |
|
BlojsomProperties(java.lang.String encoding)
Properties class extension with customizable encoding support. |
|
| Method Summary | |
java.lang.String |
getProperty(java.lang.String key)
Searches for the property with the specified key in this property list. |
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Searches for the property with the specified key in this property list. |
void |
load(java.io.InputStream in)
Load the properties from disk |
void |
setAllowMultipleValues(boolean allowMultipleValues)
Set whether or not multiple values should be allowed. |
void |
setEncoding(java.lang.String encoding)
Set the encoding used to read and write the properties file |
void |
store(java.io.OutputStream out,
java.lang.String header)
Write the properties to disk |
| Methods inherited from class java.util.Properties |
list, list, propertyNames, save, setProperty |
| Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public BlojsomProperties()
public BlojsomProperties(boolean allowMultipleValues)
allowMultipleValues is true, then this class
will allow multiple values for a single key. They will be stored under the
same key in a List.
allowMultipleValues - If multiple keys are allowedpublic BlojsomProperties(java.util.Properties defaults)
defaults - Default properties to initialize the Properties objectpublic BlojsomProperties(java.lang.String encoding)
encoding - Character encoding to use when reading and writing properties| Method Detail |
public void setAllowMultipleValues(boolean allowMultipleValues)
allowMultipleValues is
true, then this class will allow multiple values for a single key.
They will be stored under the same key in a List.
allowMultipleValues - If multiple values should be allowed.public void setEncoding(java.lang.String encoding)
encoding - File encoding for reading and writing of the properties file
public void store(java.io.OutputStream out,
java.lang.String header)
throws java.io.IOException
out - Output stream to write toheader - Header to write at the top of the properties file
java.io.IOException - If there is an error writing the properties
public void load(java.io.InputStream in)
throws java.io.IOException
in - Input stream from which to read the properties
java.io.IOException - If there is an error reading the propertiespublic java.lang.String getProperty(java.lang.String key)
null if the property is not found.
key - the property key.
Properties.setProperty(java.lang.String, java.lang.String),
Properties.defaults
public java.lang.String getProperty(java.lang.String key,
java.lang.String defaultValue)
key - the hashtable key.defaultValue - a default value.
Properties.setProperty(java.lang.String, java.lang.String),
Properties.defaults
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||