I am using BufferedReader
to get a String
from a .txt
File
BufferedReader read = new BufferedReader(
new InputStreamReader(getAssets().open(name)));
BufferedReader count = new BufferedReader(
new InputStreamReader(getAssets().open(name)));
String line;
String str = null;
while((line = count.readLine()) != null)
{
str += read.readLine() + "\n";
}
Than I display that String
in a TextView
But it displays null and than my String
nullThis is file 1
rather than
This is file 1
How can I fix this??