Android Utililty Methods FileReader Create

List of utility methods to do FileReader Create

Description

The list of methods to do FileReader Create are organized into topic(s).

Method

ListloadFile(File file)
load File
List<String> lines = new ArrayList<String>();
if (file.exists()) {
    BufferedReader reader = new BufferedReader(new FileReader(file));
    String line = reader.readLine();
    while (line != null) {
        line = line.trim();
        if (line.length() != 0) {
            lines.add(line);
...
StringreadTextFile(String fullPathFilename)
read Text File
StringBuffer contents = new StringBuffer();
BufferedReader reader = null;
reader = new BufferedReader(new FileReader(fullPathFilename));
String text = null;
while ((text = reader.readLine()) != null) {
    contents.append(text).append(
            System.getProperty("line.separator"));
reader.close();
return contents.toString();