Java Text File Write writeStringTo(String _value, File _target)

Here you can find the source of writeStringTo(String _value, File _target)

Description

write String To

License

Open Source License

Declaration

public static void writeStringTo(String _value, File _target) throws IOException 

Method Source Code

//package com.java2s;

import java.io.BufferedWriter;
import java.io.File;

import java.io.FileWriter;

import java.io.IOException;

public class Main {
    public static void writeStringTo(String _value, File _target) throws IOException {
        BufferedWriter writer = new BufferedWriter(new FileWriter(_target));
        try {/*  ww w .  ja  v a 2s.c  o  m*/
            if (null != _value)
                writer.write(_value);
        } finally {
            writer.close();
        }
    }
}

Related

  1. writeStringInto(String s, File outputFile)
  2. writeStringInto(String s, File outputFile)
  3. writeStringListToFile(File file, ArrayList lines)
  4. writeStringListToFile(File file, List lines)
  5. writeStringTo(File outFile, String data)
  6. writeStringToFile(@Nonnull String string, @Nonnull final File file)
  7. writeStringToFile(CharSequence contents, String filename)
  8. writeStringToFile(File f, String content, boolean append)
  9. writeStringToFile(File f, String s)