How to convert .txt files to multiline String in Android Java -


i've been stuck on couple of days, cant find method open .txt file. need convert multiline string , set textview. can me please?

as file location, i'm using:

string saveloc = environment.getexternalstoragedirectory()+"/my documents/"; public string title; public string ftype = ".txt";  (saveloc+title+ftype) //is file location. 

i can read data file input stream, if try , loads of errors wont let app run.

use apache commons io fileutils.readlines()

readlines public static list readlines(file file, charset encoding) throws ioexception reads contents of file line line list of strings. file closed. parameters: file - file read, must not null encoding - encoding use, null means platform default returns: list of strings representing each line in file, never null throws: ioexception - in case of i/o error since: 2.3


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -