Android examples for java.util:Properties
Read Properties File
import java.io.File; import java.io.FileInputStream; import java.util.Properties; public class Main { public static final String filePath = "cookie.prop"; public static Properties get() { FileInputStream fis = null;/*ww w . j av a 2 s . c o m*/ Properties props = new Properties(); try { File Conf = new File(filePath); if (!Conf.exists()) { Conf.createNewFile(); } fis = new FileInputStream(Conf); props.load(fis); } catch (Exception e) { } finally { try { fis.close(); } catch (Exception e) { } } return props; } }