Свойство | Тип | Описание | |
---|---|---|---|
defaults |
Свойство | Тип | Описание | |
---|---|---|---|
AsString | string |
Метод | Описание | |
---|---|---|
GetProperty ( string key ) : string |
Get the value for the specified key value. If the key is not found, then return the default value - and if still not found, return null.
|
|
GetProperty ( string key, string defaultValue ) : string |
Get the value for the specified key value. If the key is not found, then return the default value - and if still not found, return
|
|
JavaProperties ( ) : System |
An empty constructor that doesn't set the defaults.
|
|
JavaProperties ( |
Use this constructor to provide a set of default values. The default values are kept separate to the ones in this instant.
|
|
Load ( Stream streamIn ) : void |
Load Java Properties from a stream expecting the format as described in JavaPropertyReader.
|
|
Load ( Stream streamIn, |
Load Java Properties from a stream with the specified encoding and expecting the format as described in JavaPropertyReader.
|
|
PropertyNames ( ) : IEnumerator |
Returns an enumerator of all the properties available in this instance - including the defaults.
|
|
SetProperty ( string key, string newValue ) : string |
Set the value for a property key. The old value is returned - if any.
|
|
Store ( Stream streamOut, string comments ) : void |
Store the contents of this collection of properties to the stream in the format used for Java ".properties" files using an instance of JavaPropertyWriter. The keys and values will be minimally escaped to ensure special characters are read back in properly. Keys are not sorted. The file will begin with a comment identifying the date - and an additional comment may be included.
|
Метод | Описание | |
---|---|---|
AsString ( Object o ) : string |
A utility method to safely convert an
|
public GetProperty ( string key ) : string | ||
key | string | The key whose value should be returned. |
Результат | string |
public GetProperty ( string key, string defaultValue ) : string | ||
key | string | The key whose value should be returned. |
defaultValue | string | The default value if the key is not found. |
Результат | string |
public JavaProperties ( |
||
defaults | A Hashtable that holds a set of defafult key value pairs to /// return when the requested key has not been set. | |
Результат | System |
public Load ( Stream streamIn ) : void | ||
streamIn | Stream | An input stream to read properties from. |
Результат | void |
public Load ( Stream streamIn, |
||
streamIn | Stream | An input stream to read properties from. |
encoding | The stream's encoding. | |
Результат | void |
public SetProperty ( string key, string newValue ) : string | ||
key | string | The key whose value is to be set. |
newValue | string | The new value off the key. |
Результат | string |
public Store ( Stream streamOut, string comments ) : void | ||
streamOut | Stream | An output stream to write the properties to. |
comments | string | Optional additional comment to include at the head of the output. |
Результат | void |