DeveelDB
20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
|
Public Member Functions | |
Properties () | |
Creates a new empty property list with no default values. More... | |
Properties (Properties defaults) | |
Object | SetProperty (String key, String value) |
void | Load (Stream inStream) |
/summary> param name="inStream"> More... | |
void | Save (Stream output, String header) |
void | Store (Stream output, String header) |
String | GetProperty (String key) |
String | GetProperty (String key, String defaultValue) |
void | List (Stream output) |
void | List (StreamWriter output) |
Protected Attributes | |
Properties | defaults |
Properties | |
ICollection | PropertyNames [get] |
Static Private Member Functions | |
static void | FormatForOutput (String str, StringBuilder buffer, bool key) |
Formats a key or value for output in a properties file. More... | |
Definition at line 24 of file Properties.cs.
|
inline |
Creates a new empty property list with no default values.
summary> Create a new empty property list with the specified default values. /summary> param name="defaults">A Properties object containing the default values.
Definition at line 31 of file Properties.cs.
|
inline |
summary> Adds the given key/value pair to this properties. /summary> param name="key">The key for this property.
param name="value">The value for this property.
This calls the hashtable method put.
returns> Returns the old value for the given key
Definition at line 39 of file Properties.cs.
|
inlinestaticprivate |
Formats a key or value for output in a properties file.
str | The string to format. |
buffer | The buffer to add it to. |
key | True if all ' ' must be escaped for the key, false if only leading spaces must be escaped for the value |
See Store for a description of the format.
Definition at line 420 of file Properties.cs.
|
inline |
summary> Gets the property with the specified key in this property list. If the key is not found, the default property list is searched. If the property is not found in the default, the specified defaultValue is returned. /summary> param name="key">The key for this property.
param name="defaultValue">A default value.
returns> Returns the value for the given key.
InvalidCastException | If this property contains any key or value that isn't a string. |
Definition at line 328 of file Properties.cs.
|
inline |
Definition at line 356 of file Properties.cs.
|
inline |
Definition at line 390 of file Properties.cs.
|
inline |
Definition at line 395 of file Properties.cs.
|
inline |
/summary> param name="inStream">
Reads a property list from an input stream. The stream should have the following format:
An empty line or a line starting with #
or !
is ignored. An backslash (</code>) at the end of the line makes the line continueing on the next line (but make sure there is no whitespace after the backslash). Otherwise, each line describes a key/value pair.
The chars up to the first whitespace, = or : are the key. You can include this caracters in the key, if you precede them with a backslash (
</code>). The key is followed by optional whitespaces, optionally one
=
or :
, and optionally some more whitespaces. The rest of the line is the resource belonging to the key.
Escape sequences
,
(a space), and unicode characters with the
, , \, ", \', !, #, \ \u
xxxx notation are detected, and converted to the corresponding single character.
# This is a comment key = value k\:5 \ a string starting with space and ending with newline
# This is a multiline specification; note that the value contains # no white space. weekdays: Sunday,Monday,Tuesday,Wednesday,\ Thursday,Friday,Saturday # The safest way to include a space at the end of a value: label = Name:\u0020
@param inStream the input stream @throws IOException if an error occurred when reading the input @throws NullPointerException if in is null
summary> Calls Store and ignores the IOException that may be thrown. /summary> param name="output">The stream to write to.
param name="header">A description of the property list.
InvalidCastException | If this property contains any key or value that are not strings. |
Definition at line 100 of file Properties.cs.
|
inline |
summary> Writes the key/value pairs to the given output stream, in a format suitable for Load. /summary> param name="output">The output stream.
param name="header">The header written in the first line, may be null.
If header is not null, this method writes a comment containing the header as first line to the stream. The next line (or first line if header is null) contains a comment with the current date. Afterwards the key/value pairs are written to the stream in the following format.
Each line has the form key = value
. Newlines, Returns and tabs are written as
resp. The characters
,,\, !, #, =
and :
are preceeded by a backslash. Spaces are preceded with a backslash, if and only if they are at the beginning of the key. Characters that are not in the ascii range 33 to 127 are written in the </c>
u
xxxx Form.
Following the listing, the output stream is flushed but left open.
InvalidCastException | If this property contains any key or value that isn't a string. |
IOException | If writing to the stream fails. |
ArgumentNullException | If output is null. |
Definition at line 255 of file Properties.cs.
|
inline |
Definition at line 56 of file Properties.cs.
|
inline |
summary> Gets the property with the specified key in this property list. If the key is not found, the default property list is searched. If the property is not found in the default, null is returned. /summary> param name="key">The key for this property.
returns> Returns the value for the given key, or null if not found.
InvalidCastException | If this property contains any key or value that isn't a string. |
Definition at line 296 of file Properties.cs.
|
protected |
Definition at line 26 of file Properties.cs.
|
get |
summary> Prints the key/value pairs to the given print stream. /summary> param name="output">The print stream, where the key/value pairs are written to.
This is mainly useful for debugging purposes.
InvalidCastException | If this property contains a key or a value that isn't a string. |
Definition at line 363 of file Properties.cs.