Java OutputStreamWriter Write saveFile(String path, String msg)

Here you can find the source of saveFile(String path, String msg)

Description

save File

License

Open Source License

Declaration

public static void saveFile(String path, String msg) throws Exception 

Method Source Code

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

import java.io.File;
import java.io.FileOutputStream;

import java.io.OutputStreamWriter;

public class Main {

    public static void saveFile(String path, String msg) throws Exception {
        FileOutputStream fos = new FileOutputStream(new File(path));
        OutputStreamWriter osw = new OutputStreamWriter(fos);
        osw.write(msg);//www  .  jav  a2 s . c o  m
        osw.flush();
        osw.close();
    }
}

Related

  1. saveDocument(String path, String textToWrite)
  2. saveFile(File file, String whatToSave, String encoding)
  3. saveFile(final File file, final String content)
  4. saveFile(String content, File f, String encoding)
  5. saveFile(String fname, String text, String encode)
  6. saveListString(List list, String filename)
  7. saveListText(String filename, List array)
  8. saveLongTxtList(long[] ids, String[] texts, String listFile)
  9. saveString(File f, String enc, String text)