//: com:bruceeckel:tools:PrintFile.java // From Thinking in Java, 2nd Edition // Available at http://www.BruceEckel.com // (c) Bruce Eckel 1999 // Copyright notice in Copyright.txt // Shorthand class for opening an output file // for human-readable output. package com.bruceeckel.tools; import java.io.*; public class PrintFile extends PrintStream { public PrintFile(String filename) throws IOException { super( new BufferedOutputStream( new FileOutputStream(filename))); } public PrintFile(File file) throws IOException { this(file.getPath()); } } ///:~