Java FileOutputStream Write saveFile(String destinationFile, String contents)

Here you can find the source of saveFile(String destinationFile, String contents)

Description

save File

License

Open Source License

Declaration

public static void saveFile(String destinationFile, String contents) throws IOException 

Method Source Code


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

import java.io.FileOutputStream;
import java.io.IOException;

import java.io.OutputStream;

public class Main {
    public static void saveFile(String destinationFile, String contents) throws IOException {
        OutputStream os = new FileOutputStream(destinationFile);
        os.write(contents.getBytes());//from ww  w . j a va  2 s . c om
        os.close();
    }
}

Related

  1. saveFile(InputStream is, String destDir, String fileName)
  2. savefile(InputStream source, String destination)
  3. saveFile(InputStream uploadedInputStream, String serverLocation)
  4. saveFile(String content, String path)
  5. saveFile(String desEncryptTempFile, byte[] text)
  6. saveFile(String dir, String fileName, String data)
  7. saveFile(String file, String text)
  8. saveFile(String fileName, byte[] bytes)
  9. saveFile(String filename, byte[] content)