Here you can find the source of getPrintStreamForFile(final File f)
public static PrintStream getPrintStreamForFile(final File f) throws RuntimeException
//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; } }