createPrintWriter

Makes a PrintWriter from the given path, any IOExceptions are caught and logged. The path must be to a file, not a directory. If the directories that are on the path do not exist, they are created. If the referenced file exists it is written over.

Return

the returned PrintWriter, or a PrintWriter wrapping System.out if some problem occurs

Parameters

pathToFile

the path to the file that will be underneath the PrintWriter, must not be null


Makes a PrintWriter from the given File. IOExceptions are caught and logged. If the file exists it is written over.

Return

the PrintWriter, may be System.out if an IOException occurred

Parameters

file

the file support the returned PrintWriter, must not be null


Makes the file in the directory that the program launched within

Return

the created PrintWriter, may be System.out if an IOException occurred

Parameters

fileName

the name of the file to make