Change you code as :
AssetManager am = getAssets();
InputStream inputStream = null;
try {
inputStream= am.open("texts/hello.txt"); //<<<<
String text = loadTextFile(inputStream);
tv.setText(text);
} catch (IOException e) {
// your code here
because you are passing null inputStream
to loadTextFile
method