Java FileWriter Write saveToFile(String location, File tempFile)

Here you can find the source of saveToFile(String location, File tempFile)

Description

save To File

License

Apache License

Declaration

public static void saveToFile(String location, File tempFile) throws IOException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.File;

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

public class Main {
    public static void saveToFile(String location, File tempFile) throws IOException {

        FileWriter fw = new FileWriter(tempFile.getAbsolutePath(), true); // the
                                                                          // true
                                                                          // will
                                                                          // append
                                                                          // the
                                                                          // string
                                                                          // to
                                                                          // the
                                                                          // file
        fw.write(location + "\n");
        fw.close();/*from   w w  w.j av  a2  s  .c  om*/
    }
}

Related

  1. saveToFile(File file, String text)
  2. saveToFile(List lines, String pathname)
  3. saveToFile(List list, String filename, boolean append)
  4. saveToFile(String fileName, String resultStr)
  5. saveToFile(String fileName, String str)
  6. saveToFile(String path, String line)
  7. saveToFile(String prefix, Reader input)
  8. saveToJson(Object object, String file)
  9. saveToTempFile(File folder, String content, String fileType)