public static synchronized Properties getConfigFile(String path)
{
private static Properties ConfigProperties = new Properties();
String configPath = path;
File file = new File(configPath);
BufferedInputStream propertyStream = null;
FileInputStream fis = null;
try
{
if (file.exists())
{
fis = new FileInputStream(configPath);
propertyStream = new BufferedInputStream(fis);
ConfigProperties.load(propertyStream);
return ConfigProperties;
}
else
{
return null;
}
}
catch (Exception e)
{
e.printStackTrace();
return null;
}
finally
{
closeHandle(fis, propertyStream);
}
}
{
private static Properties ConfigProperties = new Properties();
String configPath = path;
File file = new File(configPath);
BufferedInputStream propertyStream = null;
FileInputStream fis = null;
try
{
if (file.exists())
{
fis = new FileInputStream(configPath);
propertyStream = new BufferedInputStream(fis);
ConfigProperties.load(propertyStream);
return ConfigProperties;
}
else
{
return null;
}
}
catch (Exception e)
{
e.printStackTrace();
return null;
}
finally
{
closeHandle(fis, propertyStream);
}
}