Android Text File Read setFileResourceText(String path, String content)

Here you can find the source of setFileResourceText(String path, String content)

Description

set File Resource Text

Declaration

public static void setFileResourceText(String path, String content)
            throws IOException 

Method Source Code

//package com.java2s;

import java.io.BufferedWriter;

import java.io.FileWriter;
import java.io.IOException;

public class Main {
    public static void setFileResourceText(String path, String content)
            throws IOException {
        BufferedWriter fileWriter = null;
        try {//  w w  w.  ja  v a  2  s  .  c o m
            fileWriter = new BufferedWriter(new FileWriter(path));
            fileWriter.write(content);
        } finally {
            if (fileWriter != null) {
                fileWriter.close();
            }
        }
    }
}

Related

  1. readStringFromClasspath(String path, Class c)
  2. readStringFromFile(String fileName)
  3. readText(String path)
  4. readTextFile(String filePath)
  5. readTextFile(String path)
  6. getContent(String file, String encodType)
  7. getString(File file)
  8. readFileSdcard(File file)
  9. readFromFile(Context context, String fileName)