Java Text File Write writeString(String data, String file_path)

Here you can find the source of writeString(String data, String file_path)

Description

write String

License

Open Source License

Declaration

public static void writeString(String data, String file_path) 

Method Source Code


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

import java.io.FileOutputStream;

public class Main {
    public static void writeString(String data, String file_path) {
        try {//w ww . j av  a 2 s  .c  o m
            FileOutputStream out_s = new FileOutputStream(file_path);
            out_s.write(data.getBytes());
            out_s.close();
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
}

Related

  1. writeString(String a, String MyFilePath)
  2. writeString(String content, String path, String charset)
  3. writeString(String contents, File file)
  4. writeString(String contents, File file)
  5. writeString(String data, File file)
  6. writeString(String fileName, String str)
  7. writeString(String filePath, boolean append, String content, String encoding)
  8. writeString(String filePath, String content)
  9. writeString(String par0)