Here you can find the source of getPrintStream(String file)
public static PrintStream getPrintStream(String file) throws IOException
//package com.java2s; import java.io.*; public class Main { /**//from w w w. j a va 2 s . c o m * Return a buffered print stream stream for file. */ public static PrintStream getPrintStream(String file) throws IOException { return getPrintStream(new File(file)); } /** * Return a buffered print stream stream for f. */ public static PrintStream getPrintStream(File f) throws IOException { return new PrintStream(new BufferedOutputStream(new FileOutputStream(f), 32676), true); } }