Java File Write fileWriteString(String filePath, String strWrite, boolean append)

Here you can find the source of fileWriteString(String filePath, String strWrite, boolean append)

Description

file Write String

License

Open Source License

Declaration

public static void fileWriteString(String filePath, String strWrite,
            boolean append) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.File;

import java.io.IOException;

import java.io.Writer;
import java.io.FileWriter;

public class Main {
    public static void fileWriteString(String filePath, String strWrite,
            boolean append) {

        File f = new File(filePath);
        Writer out = null;//  w ww  .j  av  a  2s .c  o  m

        try {
            out = new FileWriter(f, append);
            out.write(strWrite);
            out.close();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
}

Related

  1. fileWrite(String path, int format, String content, Object bytesObj)
  2. fileWrite(String[] text, File file)
  3. fileWriteOut(InputStream in, String outPath)
  4. fileWriter(int startpt, int letter)
  5. fileWriter(String outfile, String contents, boolean append)