|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ops4j.util.collections.PropertiesWriter
public class PropertiesWriter
Helper for writing properties files.
| Constructor Summary | |
|---|---|
PropertiesWriter(OutputStream outputStream)
Creates a new property writer with default sperator (,). |
|
PropertiesWriter(OutputStream outputStream,
String separator)
Creates a new property writer with a custom separator. |
|
| Method Summary | |
|---|---|
PropertiesWriter |
append()
Appends an empty line |
PropertiesWriter |
append(String comment)
Appends a comment to be written. |
PropertiesWriter |
append(String key,
String value)
Appends a property to be written. |
PropertiesWriter |
appendRaw(String value)
Appends a raw value = will be exactely as recived. |
void |
write()
Write properties to output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertiesWriter(OutputStream outputStream)
outputStream - the output stream to write properties to.
public PropertiesWriter(OutputStream outputStream,
String separator)
outputStream - the output stream to write properties to.separator - separator to be used to separate multiple properties
org.ops4j.lang.NullArgumentException - if output stream or separator are null| Method Detail |
|---|
public PropertiesWriter append(String key,
String value)
key - key of propertyvalue - value of property
org.ops4j.lang.NullArgumentException - if key is null or emptypublic PropertiesWriter append(String comment)
comment - The comment to add to the Properties file.
public PropertiesWriter append()
public PropertiesWriter appendRaw(String value)
value - a raw value
public void write()
throws IOException
IOException - re-thrown from output stream
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||