Java PrintStream Create getPrintStreamForFile(final File f)

Here you can find the source of getPrintStreamForFile(final File f)

Description

get Print Stream For File

License

Open Source License

Declaration

public static PrintStream getPrintStreamForFile(final File f) throws RuntimeException 

Method Source Code


//package com.java2s;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;

public class Main {
    public static PrintStream getPrintStreamForFile(final File f) throws RuntimeException {
        final PrintStream out;
        try {//from  w  ww  .j a  v a  2s.  co  m
            out = new PrintStream(f);
        } catch (IOException e) {
            throw new RuntimeException("on create test tempout file", e);
        }
        return out;
    }
}

Related

  1. getPrintStream(String file)
  2. getPrintStream(String file)
  3. getPrintStream(String fileName)
  4. getPrintStream(String filename, boolean append)
  5. getPrintStream(String string)