Java FileWriter Write saveStringToDisc(final String params, final String filePath)

Here you can find the source of saveStringToDisc(final String params, final String filePath)

Description

save String To Disc

License

Open Source License

Declaration

public static void saveStringToDisc(final String params, final String filePath) throws IOException

    

Method Source Code


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

import java.io.*;

public class Main {
    public static void saveStringToDisc(final String params, final String filePath) throws IOException

    {//from   w  ww.  j  a v  a2  s. c om
        FileWriter fileWriter = null;
        try {
            fileWriter = new FileWriter(new File(filePath));
            fileWriter.write(params);
        } finally {
            if (fileWriter != null) {
                fileWriter.close();
            }
        }
    }
}

Related

  1. saveString(File filename, String content)
  2. saveString(String filePath, String content)
  3. saveString(String location, String content)
  4. saveStringFile(String fileName, String str)
  5. saveStringInFile(String filePath, String data)
  6. saveStringToFile(String content, File destFile)
  7. saveStringToFile(String filePath, String content, boolean isOverwrite)
  8. saveStringToFile(String fileToSave, String data)
  9. saveStringToFile(String string, String fileName)