public class GroovyPrintWriter
extends PrintWriter
A PrintWriter that outputs objects in Groovy style. That means print(Object) uses InvokerHelper.toString(Object) to produce the same results as Writer.print(Object).
| Constructor and description |
|---|
GroovyPrintWriter(File file)Creates a writer for the supplied file. |
GroovyPrintWriter(File file, String csn)Creates a writer for the supplied file using the given charset name. |
GroovyPrintWriter(Writer out)Creates a writer that delegates to the supplied writer. |
GroovyPrintWriter(Writer out, boolean autoflush)Creates a writer that delegates to the supplied writer. |
GroovyPrintWriter(OutputStream out)Creates a writer for the supplied output stream. |
GroovyPrintWriter(OutputStream out, boolean autoflush)Creates a writer for the supplied output stream. |
GroovyPrintWriter(String filename)Creates a writer for the supplied file name. |
GroovyPrintWriter(String filename, String csn)Creates a writer for the supplied file name using the given charset name. |
| Methods inherited from class | Name |
|---|---|
class PrintWriter |
append, append, append, append, append, append, append, append, append, checkError, close, equals, flush, format, format, getClass, hashCode, notify, notifyAll, nullWriter, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, toString, wait, wait, wait, write, write, write, write, write |
Creates a writer for the supplied file.
file - the target fileCreates a writer for the supplied file using the given charset name.
file - the target filecsn - the charset nameCreates a writer that delegates to the supplied writer.
out - the underlying writerCreates a writer that delegates to the supplied writer.
out - the underlying writerautoflush - whether println operations flush automaticallyCreates a writer for the supplied output stream.
out - the underlying output streamCreates a writer for the supplied output stream.
out - the underlying output streamautoflush - whether println operations flush automaticallyCreates a writer for the supplied file name.
filename - the target file nameCreates a writer for the supplied file name using the given charset name.
filename - the target file namecsn - the charset nameCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.