Android examples for java.util:Properties
read Value from Properties
//package com.java2s; import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.InputStream; import java.util.Properties; public class Main { public static String readValue(String filePath, String key) { Properties props = new Properties(); try {//from w ww.j a v a2 s .c om InputStream in = new BufferedInputStream(new FileInputStream( filePath)); props.load(in); String value = props.getProperty(key); System.out.println(key + value); return value; } catch (Exception e) { e.printStackTrace(); return null; } } }