Android File Write writeFile(File file, String data)

Here you can find the source of writeFile(File file, String data)

Description

write File

Declaration

public static void writeFile(File file, String data) throws IOException 

Method Source Code

//package com.java2s;

import java.io.BufferedWriter;
import java.io.File;

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

public class Main {
    public static void writeFile(File file, String data) throws IOException {
        FileWriter fstream = new FileWriter(file);
        BufferedWriter out = new BufferedWriter(fstream);
        out.write(data);//from   w w  w . j  av  a  2  s . c om
        out.close();
    }
}

Related

  1. writeContatctInfo(String accountId, Vector contactInfo, File contactInfoFile)
  2. writeFile(File file, byte[] data)
  3. writeInstallationFile(File installation)
  4. writeOneLine(String filename, String value)
  5. stringToFile(String filename, String stringToWrite)