C# Class Kajabity.Tools.Java.JavaPropertyWriter

Use this class for writing a set of key value pair strings to an output stream using the Java properties format.
Show file Open project: Kajabity/Kajabity-Tools Class Usage Examples

Public Methods

Method Description
JavaPropertyWriter ( Hashtable hashtable ) : System

Construct an instance of this class.

Write ( Stream stream, string comments ) : void

Write the properties to the output stream.

Private Methods

Method Description
escapeKey ( string s ) : string

Escape the string as a Key with character set ISO-8859-1 - the characters 0-127 are US-ASCII and we will escape any others. The passed string is Unicode which extends ISO-8859-1 - so all is well.

escapeValue ( string s ) : string

Method Details

JavaPropertyWriter() public method

Construct an instance of this class.
public JavaPropertyWriter ( Hashtable hashtable ) : System
hashtable System.Collections.Hashtable The Hashtable (or JavaProperties) instance /// whose values are to be written.
return System

Write() public method

Write the properties to the output stream.
public Write ( Stream stream, string comments ) : void
stream Stream The output stream where the properties are written.
comments string Optional comments that are placed at the beginning of the output.
return void