Android examples for java.util:Properties
read Properties from Path
//package com.java2s; import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.InputStream; import java.util.Enumeration; import java.util.Properties; public class Main { public static void readProperties(String filePath) { Properties props = new Properties(); try {//from ww w . ja v a 2s .c om InputStream in = new BufferedInputStream(new FileInputStream( filePath)); props.load(in); Enumeration<?> en = props.propertyNames(); while (en.hasMoreElements()) { String key = (String) en.nextElement(); String Property = props.getProperty(key); System.out.println(key + Property); } } catch (Exception e) { e.printStackTrace(); } } }