|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Writer
java.io.FilterWriter
org.apache.commons.configuration.PropertiesConfiguration.PropertiesWriter
public static class PropertiesConfiguration.PropertiesWriter
This class is used to write properties lines.
Field Summary |
---|
Fields inherited from class java.io.FilterWriter |
---|
out |
Fields inherited from class java.io.Writer |
---|
lock |
Constructor Summary | |
---|---|
PropertiesConfiguration.PropertiesWriter(java.io.Writer writer,
char delimiter)
Constructor. |
Method Summary | |
---|---|
void |
writeComment(java.lang.String comment)
Write a comment. |
void |
writeln(java.lang.String s)
Helper method for writing a line with the platform specific line ending. |
void |
writeProperty(java.lang.String key,
java.util.List values)
Write a property. |
void |
writeProperty(java.lang.String key,
java.lang.Object value)
Write a property. |
void |
writeProperty(java.lang.String key,
java.lang.Object value,
boolean forceSingleLine)
Writes the given property and its value. |
Methods inherited from class java.io.FilterWriter |
---|
close, flush, write, write, write |
Methods inherited from class java.io.Writer |
---|
append, append, append, append, append, append, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertiesConfiguration.PropertiesWriter(java.io.Writer writer, char delimiter)
writer
- a Writer object providing the underlying streamdelimiter
- the delimiter character for multi-valued propertiesMethod Detail |
---|
public void writeProperty(java.lang.String key, java.lang.Object value) throws java.io.IOException
key
- the key of the propertyvalue
- the value of the property
java.io.IOException
- if an I/O error occurspublic void writeProperty(java.lang.String key, java.util.List values) throws java.io.IOException
key
- The key of the propertyvalues
- The array of values of the property
java.io.IOException
- if an I/O error occurspublic void writeProperty(java.lang.String key, java.lang.Object value, boolean forceSingleLine) throws java.io.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" flag
java.io.IOException
- if an error occurspublic void writeComment(java.lang.String comment) throws java.io.IOException
comment
- the comment to write
java.io.IOException
- if an I/O error occurspublic void writeln(java.lang.String s) throws java.io.IOException
s
- the content of the line (may be null)
java.io.IOException
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |