Package org.apache.felix.utils.properties

# Class Properties.PropertiesWriter

java.lang.Object
java.io.Writer
java.io.FilterWriter
org.apache.felix.utils.properties.Properties.PropertiesWriter

All Implemented Interfaces:
  `Closeable`, `Flushable`, `Appendable`, `AutoCloseable`

Enclosing class:
  `Properties`

public static class Properties.PropertiesWriter extends FilterWriter
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

Constructors
Constructor
Description
`PropertiesWriter(Writer writer)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`writeln(String s)`
Helper method for writing a line with the platform specific line ending.
`void`
`writeProperty(String key, String value)`
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, nullWriter, write, write`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### PropertiesWriter

public PropertiesWriter(Writer writer)
Constructor.

Parameters:
  `writer` - a Writer object providing the underlying stream

## Method Details

### writeProperty

public void writeProperty(String key, String value) throws IOException
Writes the given property and its value.

Parameters:
  `key` - the property key
  `value` - the property value
Throws:
  `IOException` - if an error occurs

### writeln

public void writeln(String s) throws IOException
Helper method for writing a line with the platform specific line ending.

Parameters:
  `s` - the content of the line (may be null)
Throws:
  `IOException` - if an error occurs