Simple Code to read a File in Android (FROM INTERNAL STORAGE) to a String
String readFile(Context context, String filename) throws IOException {
String ret = "";
InputStream inStream = context.openFileInput(filename);
if ( inStream != null ) {
InputStreamReader inputStreamReader = new InputStreamReader(inStream);
BufferedReader bufReader = new BufferedReader(inputStreamReader);
String currentString;
StringBuilder finalString = new StringBuilder();
while ( (currentString = bufReader.readLine()) != null ) {
finalString.append("\n").append(currentString);
}
inStream.close();
ret = finalString.toString();
}
return ret;
}