List of utility methods to do Text File Read
String | readFromFile(Context context, String fileName) read From File InputStream is = null; StringBuilder sb = new StringBuilder(); File file; if (fileName == null || fileName.equals("")) { return null; try { file = context.getFileStreamPath(fileName); ... |
String | loadTextFile(Context context, String textFile) load Text File AssetManager assetManager = context.getAssets(); InputStream inputStream = assetManager.open(textFile); BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(inputStream)); StringBuilder stringBuilder = new StringBuilder(); String line = bufferedReader.readLine(); stringBuilder.append(line); while (true) { ... |