Java PrintWriter Create getPrintWriter(final File aFile, final boolean append)

Here you can find the source of getPrintWriter(final File aFile, final boolean append)

Description

get Print Writer

License

Open Source License

Exception

Parameter Description
IOException an exception

Declaration

public static PrintWriter getPrintWriter(final File aFile, final boolean append) throws IOException 

Method Source Code


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

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;

public class Main {
    /**/*ww w.j  av  a2 s . c o  m*/
     * @return
     * @throws IOException
     */
    public static PrintWriter getPrintWriter(final File aFile, final boolean append) throws IOException {
        final FileWriter resFileOut = new FileWriter(aFile, append);
        PrintWriter ret = new PrintWriter(resFileOut);
        return ret;
    }
}

Related

  1. getPrintWriter(File f)
  2. getPrintWriter(File file)
  3. getPrintWriter(File file)
  4. getPrintwriter(File file, boolean append)
  5. getPrintWriter(String filename)
  6. getPrintWriter(String fileName, Writer out)
  7. getPrintWriter(String nombreFichero)
  8. getPrintWriter(String path, String charset, boolean isAppend)