public static java.io.PrintWriter | printWriterFor(java.io.Writer writer)Makes a PrintWriter for the given Writer ,
returning the given writer if it already happens to be the right
class.
if (writer instanceof PrintWriter) {
return (PrintWriter) writer;
}
return new PrintWriter(writer);
|