Java FileWriter Write saveTxt(String line, String filename, boolean isEndSave)

Here you can find the source of saveTxt(String line, String filename, boolean isEndSave)

Description

save Txt

License

Open Source License

Declaration

public static void saveTxt(String line, String filename, boolean isEndSave) 

Method Source Code

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

import java.io.BufferedWriter;

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

public class Main {
    public static void saveTxt(String line, String filename, boolean isEndSave) {
        try {/*from w  w w  .ja  v  a  2 s  . com*/
            FileWriter file = new FileWriter(filename, isEndSave);
            BufferedWriter writer = new BufferedWriter(file);

            writer.write(line);
            writer.newLine();

            writer.close();

        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

Related

  1. saveToFile(String path, String line)
  2. saveToFile(String prefix, Reader input)
  3. saveToJson(Object object, String file)
  4. saveToTempFile(File folder, String content, String fileType)
  5. saveTreeStructuredGroupList(ArrayList> treeStructuredGroupList, String filePath)
  6. saveTxtFile(String fileName, String content)