public int importFromCsv ( Context ctx , SQLiteDatabase db , String suffix ) { String filename = getCsvFilename ( db . getPath ( ) , db . getVersion ( ) , suffix ) ; FileInputStream fileInputStream ; try { fileInputStream = ctx . openFileInput ( filename ) ; return importFromCsv ( db , fileInputStream ) ; } catch ( FileNotFoundException e ) { e . printStackTrace ( ) ; return - 1 ; } }
Attempts to import a database table from a CSV file in the default location .