Java tutorial
//package com.java2s; import java.io.FileInputStream; import java.io.InputStream; import android.content.Context; import android.util.Log; public class Main { private static final String TAG = "CommonUtils"; public static InputStream readStreamFromFile(String fileName, Context context) { FileInputStream fis = null; try { // First read the user agent from private memory fis = context.openFileInput(fileName);// listType as filename } catch (Exception exp) { Log.v(TAG, "GetMedia list lastupdated time - exp:" + exp.getMessage()); } return fis; } }