Code example for FileReader

0
    public static String readOneLine(String fname) {
        BufferedReader br;
        String line = null;
 
        try { 
            br = new BufferedReader(new FileReader(fname), 512);
            try { 
                line = br.readLine();
            } finally { 
                br.close();
            } 
        } catch (Exception e) {
            Log.e(TAG, "IO Exception when reading /sys/ file", e);
        } 
        return line;
    } 
 
    public static boolean writeOneLine(String fname, String value) {
        try { 
            FileWriter fw = new FileWriter(fname);
            try {