org.apache.commons.configuration
public static class PropertiesConfiguration.PropertiesWriter extends FilterWriter
Field Summary | |
---|---|
char | delimiter The delimiter for multi-valued properties. |
Constructor Summary | |
---|---|
PropertiesWriter(Writer writer, char delimiter)
Constructor.
|
Method Summary | |
---|---|
String | escapeKey(String key)
Escape the separators in the key.
|
String | escapeValue(Object value)
Escapes the given property value. |
String | makeSingleLineValue(List values)
Transforms a list of values into a single line value.
|
void | writeComment(String comment)
Write a comment.
|
void | writeln(String s)
Helper method for writing a line with the platform specific line
ending.
|
void | writeProperty(String key, Object value)
Write a property.
|
void | writeProperty(String key, List values)
Write a property.
|
void | writeProperty(String key, Object value, boolean forceSingleLine)
Writes the given property and its value. |
Parameters: writer a Writer object providing the underlying stream delimiter the delimiter character for multi-valued properties
Parameters: key the key
Returns: the escaped key
Since: 1.2
Parameters: value the property value
Returns: the escaped property value
Since: 1.3
Parameters: values the list with the values
Returns: a string with the single line value (can be null)
Since: 1.3
Parameters: comment the comment to write
Throws: IOException if an I/O error occurs
Parameters: s the content of the line (may be null)
Throws: IOException if an error occurs
Since: 1.3
Parameters: key the key of the property value the value of the property
Throws: IOException if an I/O error occurs
Parameters: key The key of the property values The array of values of the property
Throws: IOException if an I/O error occurs
forceSingleLine
flag is evaluated. If it is
set, all values are written on a single line using the list delimiter
as separator.
Parameters: key the property key value the property value forceSingleLine the "force single line" flag
Throws: IOException if an error occurs
Since: 1.3