|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dtools.ini.IniFileReader
public class IniFileReader
This class provides users an easy way to read INI files from the
hard disk and parse them to an IniFile
object.
Constructor Summary | |
---|---|
IniFileReader(IniFile ini,
File file)
Default constructor, creates a new IniFileReader object
which will read from the given file and populate the given data from the
file into the given IniFile object. |
Method Summary | |
---|---|
void |
read()
This method begins the reading process of the file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IniFileReader(IniFile ini, File file)
IniFileReader
object
which will read from the given file and populate the given data from the
file into the given IniFile
object.
ini
- The IniFile which will be populated.file
- The file that will be read as an INI file.Method Detail |
---|
public void read() throws IOException
This method begins the reading process of the file. The method opens
the input file, which is set in the constructor, reads each line from the
file, and parse that file to the IniFile
object, which is
also set in the constructor.
If the method encounters a line of text from the string which it is
unable to parse to the IniFile
, then this method throws a
FormatException
exception.
FormatException
- If an error is encountered whilst reading the
input file.
IOException
- If an exception occurs whilst reading the file.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |