import java.io.File;
import java.io.FileInputStream;
import java.util.Properties;
public class Connection
{
private static final Connection con = new Connection("conf/www/www.properties");
public static Connection getInstanse()
{
return con;
}
private Properties pro;
private Connection(String path)
{
pro = new Properties();
File file = new File(path);
if (file.isFile())
{
try
{
FileInputStream in = new FileInputStream(file);
pro.load(in);
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
public String getValue(String key)
{
return pro.getProperty(key);
}
public String getUrl()
{
return getValue("wwwurl");
}
}