Here you can find the source of getPrintStream(String string)
public static PrintStream getPrintStream(String string)
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { public static PrintStream getPrintStream(String string) { try {/*from w w w. j a v a 2 s .c o m*/ return new PrintStream(new FileOutputStream(string)); } catch (FileNotFoundException e) { e.printStackTrace(); } return null; } }