|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pf.settings.rw.AbstractSettingsReaderWriter
org.pf.settings.rw.AbstractSettingsFileReaderWriter
org.pf.settings.rw.IniReaderWriter
public class IniReaderWriter
Read and writes settings from/into Windows ini files.
| Constructor Summary | |
|---|---|
IniReaderWriter(FileLocator locator)
Initialize the new instance with a locator that points to an ini file. |
|
IniReaderWriter(FileLocator locator,
java.lang.String charsetName)
Initialize the new instance with a locator that points to an ini file and a name for the character encoding of that file. |
|
IniReaderWriter(java.lang.String filename)
Initialize the new instance with a filename. |
|
IniReaderWriter(java.lang.String filename,
java.lang.String charsetName)
Initialize the new instance with a filename and a character encoding. |
|
| Method Summary | |
|---|---|
java.lang.String |
getCommentSeparator()
Returns the separator that indicates the beginning of a comment The default is ";" |
java.lang.String |
getKeyValueSeparator()
Returns the separator between a key and its associated value The default is "=" |
boolean |
getNewlineAfterSection()
Returns true if a new line gets added after each [section] |
void |
setCommentSeparator(java.lang.String newValue)
Set the comment separator that indicates the start of a comment |
void |
setKeyValueSeparator(java.lang.String newValue)
Sets the separator that is used between a key and its associated value |
void |
setNewlineAfterSection(boolean newValue)
If set to true then a new line gets added after each [section] |
boolean |
storeSettings(Settings settings)
Stores the given settings to the file with this object's filename in the format of Windows ini files. |
| Methods inherited from class org.pf.settings.rw.AbstractSettingsFileReaderWriter |
|---|
getEncoding, getFileName, loadSettings, loadSettingsFrom, loadSettingsFrom, setEncoding, setFileName |
| Methods inherited from class org.pf.settings.rw.AbstractSettingsReaderWriter |
|---|
loadSettings |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.pf.settings.SettingsReader |
|---|
loadSettings |
| Constructor Detail |
|---|
public IniReaderWriter(java.lang.String filename)
filename - The name of the file to read from
public IniReaderWriter(java.lang.String filename,
java.lang.String charsetName)
filename - The name of the file to read fromcharsetName - The character encoding (e.g. "UTF-8") or nullpublic IniReaderWriter(FileLocator locator)
locator - A file locator that points to the file from which to read
public IniReaderWriter(FileLocator locator,
java.lang.String charsetName)
locator - A file locator that points to the file from which to readcharsetName - The character encoding (e.g. "UTF-8") or null| Method Detail |
|---|
public java.lang.String getCommentSeparator()
public void setCommentSeparator(java.lang.String newValue)
newValue - The new separatorpublic java.lang.String getKeyValueSeparator()
public void setKeyValueSeparator(java.lang.String newValue)
public boolean getNewlineAfterSection()
public void setNewlineAfterSection(boolean newValue)
public boolean storeSettings(Settings settings)
settings - The settings to store
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||