android - Opening a text file in an activity from assets folder -


i trying search way open text file in activity assets folder in android.

i have done rnd on topic couldn't find answer precisely matches needs.
opening text file needed project.

any appreciated.

inputstream = this.getassets().open("file.txt"); bufferedreader reader = new bufferedreader(new inputstreamreader(is)); string line;  while ((line = reader.readline()) != null) {     // use line variable }  reader.close(); 

Comments