# Class: com.pnfsoftware.jeb.util.base.IniFileEditor

A reader\-and\-writer for `ini` configuration files. 

 Example of a valid ini file:  

```

 [section1]
 
 foo
 
 bar
 
 [section2]
 x
 y
 [section3]
 [section4]
 z
 
 
```

## Constructor: IniFileEditor
- parameter: `file`, type: `java.io.File`
- parameter: `commentChar`, type: `java.lang.Character`


## Constructor: IniFileEditor
- parameter: `file`, type: `java.io.File`


## Constructor: IniFileEditor
- parameter: `str`, type: `java.lang.String`
- parameter: `commentChar`, type: `java.lang.Character`


## Constructor: IniFileEditor
- parameter: `str`, type: `java.lang.String`


## Method: getCommantChar
- return type: `java.lang.Character`

Description: Retrieve the optional comment character \(full\-line comments only\).
return: 

## Method: getSectionContents
- parameter: `sectionName`, type: `java.lang.String`
- return type: `java.util.List<java.lang.String>`

Description: Retrieve the contents of a section.
parameter: sectionName: 
return: the section contents, never null; blank entries are not present

## Method: getSectionKeyValues
- parameter: `sectionName`, type: `java.lang.String`
- return type: `java.util.Map<java.lang.String,java.lang.String>`

Description: Retrieve the key\-value entries for the provided section.
parameter: sectionName: case\-sensitive section name
return: a collection, possibly empty

## Method: getSectionNames
- return type: `java.util.List<java.lang.String>`

Description: Retrieve the list of sections in the ini file.
return: 

## Method: getValue
- parameter: `keyName`, type: `java.lang.String`
- return type: `java.lang.String`

Description: Retrieve a value.
parameter: keyName: key name
return: the value, null if not found

## Method: getValue
- parameter: `sectionName`, type: `java.lang.String`
- parameter: `keyName`, type: `java.lang.String`
- return type: `java.lang.String`

Description: Retrieve a value.
parameter: sectionName: section name
parameter: keyName: key name
return: the value, null if not found

## Method: getValue
- parameter: `sectionName`, type: `java.lang.String`
- parameter: `keyName`, type: `java.lang.String`
- parameter: `delimiter`, type: `java.lang.String`
- return type: `java.lang.String`

Description: Retrieve a value.
parameter: sectionName: 
parameter: keyName: 
parameter: delimiter: 
return: the value, null if not found

## Method: setCommentChar
- parameter: `cc`, type: `java.lang.Character`

Description: Set a comment character for full\-line comments.
parameter: cc: optional

## Method: setSectionContents
- parameter: `sectionName`, type: `java.lang.String`
- parameter: `contents`, type: `java.util.List<java.lang.String>`

Description: Set the contents of a new section. The section is created if it does not exist.
parameter: sectionName: section name \(without bracket\)
parameter: contents: blank lines are not added

## Method: setValue
- parameter: `sectionName`, type: `java.lang.String`
- parameter: `keyName`, type: `java.lang.String`
- parameter: `value`, type: `java.lang.String`
- return type: `boolean`

Description: Set a value.
parameter: sectionName: 
parameter: keyName: 
parameter: value: 
return: true if the value was new or a true update; false if the key\-value pair already         exists

## Method: setValue
- parameter: `sectionName`, type: `java.lang.String`
- parameter: `keyName`, type: `java.lang.String`
- parameter: `value`, type: `java.lang.String`
- parameter: `delimiter`, type: `java.lang.String`
- return type: `boolean`

Description: Set a value.
parameter: sectionName: 
parameter: keyName: 
parameter: value: 
parameter: delimiter: 
return: true if the value was new or a true update; false if the key\-value pair already         exists

## Method: update

Description: Update the original ini file.
throws: 

## Method: write
- parameter: `newFile`, type: `java.io.File`

Description: Write the updated contents to a new ini file.
parameter: newFile: 
throws: 

