Java Text File Write writeStringToFile(String macroContent, File file)

Here you can find the source of writeStringToFile(String macroContent, File file)

Description

write String To File

License

Open Source License

Declaration

public static void writeStringToFile(String macroContent, File file) 

Method Source Code

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

import java.io.File;

public class Main {
    public static void writeStringToFile(String macroContent, File file) {
        try {/*from ww  w .ja  v a 2s.c  o m*/
            java.io.FileWriter w = new java.io.FileWriter(file);
            w.write(macroContent);
            w.close();
        } catch (Exception e) {
        }
    }
}

Related

  1. writeStringToFile(String filename, String text)
  2. WriteStringToFile(String fn, String dest)
  3. writeStringToFile(String fullPath, byte[] fileBytes)
  4. writeStringToFile(String fullPath, String content)
  5. writeStringToFile(String jsonStr, File file)
  6. writeStringToFile(String modifiedLine, String filePath)
  7. writeStringToFile(String path, String content)
  8. writeStringToFile(String path, String content)
  9. writeStringToFile(String path, String content)