|
||||||||||
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(java.io.OutputStream outputStream)
Creates a new property writer with default sperator (,). |
|
PropertiesWriter(java.io.OutputStream outputStream,
java.lang.String separator)
Creates a new property writer with a custom separator. |
Method Summary | |
---|---|
PropertiesWriter |
append()
Appends an empty line |
PropertiesWriter |
append(java.lang.String comment)
Appends a comment to be written. |
PropertiesWriter |
append(java.lang.String key,
java.lang.String value)
Appends a property to be written. |
PropertiesWriter |
appendRaw(java.lang.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(java.io.OutputStream outputStream)
outputStream
- the output stream to write properties to.public PropertiesWriter(java.io.OutputStream outputStream, java.lang.String separator)
outputStream
- the output stream to write properties to.separator
- separator to be used to separate multiple properties
NullArgumentException
- if output stream or separator are nullMethod Detail |
---|
public PropertiesWriter append(java.lang.String key, java.lang.String value)
key
- key of propertyvalue
- value of property
NullArgumentException
- if key is null or emptypublic PropertiesWriter append(java.lang.String comment)
comment
- The comment to add to the Properties file.
public PropertiesWriter append()
public PropertiesWriter appendRaw(java.lang.String value)
value
- a raw value
public void write() throws java.io.IOException
java.io.IOException
- re-thrown from output stream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |