public static String readTextFile ( Context context , String asset ) { try { InputStream inputStream = context . getAssets ( ) . open ( asset ) ; return org . gearvrf . utility . TextFile . readTextFile ( inputStream ) ; } catch ( FileNotFoundException f ) { Log . w ( TAG , "readTextFile(): asset file '%s' doesn't exist" , asset ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; Log . e ( TAG , e , "readTextFile()" ) ; } return null ; }
Read a text file from assets into a single string