The code is in chapter (5):
/**
* Read Resource Information < feature description >
*
* @param FilePath
* Resource Path (contains file name)
* @return Properties [return type description]
* @see [Class, Class # method, Class # member]
*/
Private Properties readproperties (String filePath) {
Properties Props = new properties ();
InputStream in = null;
try {
in = new Bufferedinputstream (new FileInputStream (FilePath));
Props.load (in);
} catch (FileNotFoundException e) {
Log.error (E.getmessage () + "the config file {0} is not exit");
} catch (IOException e) {
Log.error (E.getmessage () + "Read config file {0} error");
} finally {
if (null! = IN) {
try {
In.close ();
} catch (IOException e) {
Log.error (E.getmessage ()
+ "Close InputStream of file {0} error");
}
}
}
return props;
}
}
Log framework for real-time modification, real-time effective, concrete framework ideas (6)