public final class IniFileOutput extends Object
Provides a simple tool for writing an INI file.
Instances of this class contain mutable state. A net instance must be created for each file to be output.
| Modifier and Type | Method and Description |
|---|---|
static IniFileOutput |
standard(Appendable underlying)
Creates an instance, using the system default line separator and including
additional whitespace around the '=' separator.
|
static IniFileOutput |
standard(Appendable underlying,
boolean padSeparatorWithWhitespace)
Creates an instance, using the system default line separator and allowing
the padding around the '=' separator to be controlled.
|
static IniFileOutput |
standard(Appendable underlying,
boolean padSeparatorWithWhitespace,
String newLine)
Creates an instance, allowing the new line separator and the padding around
the '=' separator to be controlled.
|
static IniFileOutput |
standard(Appendable underlying,
String newLine)
Creates an instance, allowing the new line separator to be controlled and including
additional whitespace around the '=' separator.
|
void |
writeIniFile(IniFile file)
Writes the provided file to the underlying.
|
void |
writeSection(String sectionName,
PropertySet section)
Writes an individual section of an INI file to the underlying.
|
public static IniFileOutput standard(Appendable underlying)
underlying - the destination to write topublic static IniFileOutput standard(Appendable underlying, String newLine)
underlying - the destination to write tonewLine - the destination to write topublic static IniFileOutput standard(Appendable underlying, boolean padSeparatorWithWhitespace)
underlying - the destination to write topadSeparatorWithWhitespace - if true, the key-value separator will be padded with whitespacepublic static IniFileOutput standard(Appendable underlying, boolean padSeparatorWithWhitespace, String newLine)
underlying - the destination to write topadSeparatorWithWhitespace - if true, the key-value separator will be padded with whitespacenewLine - the new line separatorpublic void writeSection(String sectionName, PropertySet section)
sectionName - the name of the sectionsection - the section whose contents to writepublic void writeIniFile(IniFile file)
file - the file whose contents to writeCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.