Code next (5) Chapter:
/**
* Read Resource Information < descriptive description of specific features >
*
* @param FilePath
* Resource path (including 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;
}
}
Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.
Real-time change of the log framework, now, thinking detail framework (6)