Java Text File Save writefile(String path, String content)

Here you can find the source of writefile(String path, String content)

Description

writefile

License

Open Source License

Declaration

public void writefile(String path, String content) throws IOException 

Method Source Code


//package com.java2s;
/* Copyright 2012, UCAR/Unidata.
   See the LICENSE file for more information.
*//*from w  w w .  jav  a  2s  .co m*/

import java.io.*;

public class Main {
    public void writefile(String path, String content) throws IOException {
        FileWriter out = new FileWriter(path);
        out.write(content);
        out.close();
    }

    static public void writefile(String path, byte[] content) throws IOException {
        FileOutputStream out = new FileOutputStream(path);
        out.write(content);
        out.close();
    }
}

Related

  1. writeFile(String file, String text)
  2. writeFile(String filePath, List lines)
  3. writeFile(String path, String content)
  4. writefile(String path, String content)
  5. writeFile(String path, String content)
  6. writefile(String path, String content, boolean append)
  7. writeFile(String path, String contents)
  8. writeFile(String path, String data)
  9. writeFile(String path, String fileName, String content)