public class iniFile
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
iniFile()
We don't want this to get used so we made it protected...
|
|
iniFile(java.lang.String fname)
**********************************************************************
Create a
iniFile object from the file named in the
parameter fname . |
|
iniFile(java.lang.String path,
java.lang.String fname)
**********************************************************************
Create a
iniFile object from the file named in the
parameter fname , and found on the parameter path |
|
iniFile(java.lang.String path,
java.lang.String fname,
boolean dbg)
**********************************************************************
Create a
iniFile object from the file named in the
parameter fname , and found on the parameter path |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFileName()
**********************************************************************
Get the name of the .ini file that was used to create this object.
|
java.lang.String |
getProperty(java.lang.String propertyName)
**********************************************************************
Get the named property from the current section.
|
java.util.Enumeration |
getPropList(java.lang.String sectionName)
**********************************************************************
Get the list of properties for the section
sectionName . |
java.util.Enumeration |
getSectionList()
**********************************************************************
Get the list of Sections of this .ini File
|
static void |
main(java.lang.String[] args) |
void |
printProps(java.io.PrintStream ps)
**********************************************************************
Prints the iniFile.
|
boolean |
setSection(java.lang.String sectionName)
**********************************************************************
Set the section of the iniFile that you wish to work with.
|
protected iniFile()
public iniFile(java.lang.String fname)
iniFile
object from the file named in the
parameter fname
. The object will get the append to the
file name to the path returned by the call
System.getProperty("user.home")
.fname
- A String
containing the name of the .ini file.public iniFile(java.lang.String path, java.lang.String fname)
iniFile
object from the file named in the
parameter fname
, and found on the parameter path
path
- A String
containing the path to the .ini file.fname
- A String
containing the name of the .ini file.public iniFile(java.lang.String path, java.lang.String fname, boolean dbg)
iniFile
object from the file named in the
parameter fname
, and found on the parameter path
path
- A String
containing the path to the .ini file.fname
- A String
containing the name of the .ini file.dbg
- A boolean
that toggles debugging output.public java.lang.String getFileName()
String
containing the name of the .ini file
that was opened a parsed when this object was instantiated.public java.util.Enumeration getPropList(java.lang.String sectionName)
sectionName
.sectionName
- A String
containing the name of the
section whose property list is desired.sectionName
Returns null
if the section name doesn't exist or there are
no properties for the section.public java.lang.String getProperty(java.lang.String propertyName)
propertyName
- The name of the desired property.String
containing the value of property of the
passed property name. Returns null if the property name doesn't exist
or is not set.public java.util.Enumeration getSectionList()
public void printProps(java.io.PrintStream ps)
ps
- The PrintStream
to which to print.public boolean setSection(java.lang.String sectionName)
sectionName
- A String
containing the name of the
section that is desired.public static void main(java.lang.String[] args)
args
-