Back to project page andro_auto_framework.
The source code is released under:
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCT...
If you think the Android project andro_auto_framework listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.imaginea.botbot.api; //from w w w.ja v a2s . c om import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Properties; import org.testng.Assert; public class DefaultProperties { static Properties prop = new Properties(); static DefaultProperties instance = null; private DefaultProperties() { try { prop.load(new FileInputStream("../default.properties")); } catch (FileNotFoundException e1) { Assert.fail("Unable to load file due to error :" + e1.toString()); } catch (IOException e1) { Assert.fail("Unable to load file due to error :" + e1.toString()); } } public static DefaultProperties getDefaultProperty() { if (instance == null) { instance = new DefaultProperties(); return instance; } else return instance; } public String getValueFromProperty(String locator) { String value = prop.getProperty(locator, ""); return value; } }