public class PropertiesFileWriter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
NEWLINE |
Constructor and Description |
---|
PropertiesFileWriter()
Initialize the new instance with default values.
|
Modifier and Type | Method and Description |
---|---|
protected FileUtil |
fileUtil() |
void |
writeTo(java.io.File file,
PropertiesFileContent properties)
Writes the given properties including all comments and blank lines
to the specified file.
|
void |
writeTo(java.lang.String filename,
PropertiesFileContent properties)
Writes the given properties including all comments and blank lines
to a file with the specified name.
|
void |
writeTo(java.io.Writer writer,
PropertiesFileContent properties)
Writes the given properties including all comments and blank lines
to the given writer.
|
public PropertiesFileWriter()
public void writeTo(java.lang.String filename, PropertiesFileContent properties) throws java.io.IOException
filename
- The name of the file to write to (must not be null).properties
- The properties to write (must not be null).java.io.IOException
public void writeTo(java.io.File file, PropertiesFileContent properties) throws java.io.IOException
file
- The file to write to (must not be null).properties
- The properties to write (must not be null).java.io.IOException
public void writeTo(java.io.Writer writer, PropertiesFileContent properties) throws java.io.IOException
writer
- The writer object to write the properties to (must not be null).properties
- The properties to write (must not be null).java.io.IOException
protected FileUtil fileUtil()