public static class PropertiesConfiguration.PropertiesWriter extends FilterWriter
out| Constructor and Description |
|---|
PropertiesConfiguration.PropertiesWriter(Writer writer,
char delimiter)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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,
List values)
Write a property.
|
void |
writeProperty(String key,
Object value)
Write a property.
|
void |
writeProperty(String key,
Object value,
boolean forceSingleLine)
Writes the given property and its value.
|
public PropertiesConfiguration.PropertiesWriter(Writer writer, char delimiter)
writer - a Writer object providing the underlying streamdelimiter - the delimiter character for multi-valued propertiespublic void writeProperty(String key, Object value) throws IOException
key - the key of the propertyvalue - the value of the propertyIOException - if an I/O error occurspublic void writeProperty(String key, List values) throws IOException
key - The key of the propertyvalues - The array of values of the propertyIOException - if an I/O error occurspublic void writeProperty(String key, Object value, boolean forceSingleLine) throws IOException
forceSingleLine flag is evaluated. If it is
set, all values are written on a single line using the list delimiter
as separator.key - the property keyvalue - the property valueforceSingleLine - the "force single line" flagIOException - if an error occurspublic void writeComment(String comment) throws IOException
comment - the comment to writeIOException - if an I/O error occurspublic void writeln(String s) throws IOException
s - the content of the line (may be null)IOException - if an error occursCopyright © 2012 JBoss by Red Hat. All Rights Reserved.