Package groovy.io
Class GroovyPrintWriter
java.lang.Object
java.io.Writer
java.io.PrintWriter
groovy.io.GroovyPrintWriter
- All Implemented Interfaces:
- java.io.Closeable,- java.io.Flushable,- java.lang.Appendable,- java.lang.AutoCloseable
public class GroovyPrintWriter
extends java.io.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).
- Since:
- 1.6
- 
Field SummaryFields inherited from class java.io.PrintWriteroutFields inherited from class java.io.Writerlock
- 
Constructor SummaryConstructors Constructor Description GroovyPrintWriter(java.io.File file)GroovyPrintWriter(java.io.File file, java.lang.String csn)GroovyPrintWriter(java.io.OutputStream out)GroovyPrintWriter(java.io.OutputStream out, boolean autoflush)GroovyPrintWriter(java.io.Writer out)GroovyPrintWriter(java.io.Writer out, boolean autoflush)GroovyPrintWriter(java.lang.String filename)GroovyPrintWriter(java.lang.String filename, java.lang.String csn)
- 
Method SummaryMethods inherited from class java.io.PrintWriterappend, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, writeMethods inherited from class java.io.WriternullWriterMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
- 
Constructor Details- 
GroovyPrintWriterpublic GroovyPrintWriter(java.io.File file) throws java.io.FileNotFoundException- Throws:
- java.io.FileNotFoundException
 
- 
GroovyPrintWriterpublic GroovyPrintWriter(java.io.File file, java.lang.String csn) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException- Throws:
- java.io.FileNotFoundException
- java.io.UnsupportedEncodingException
 
- 
GroovyPrintWriterpublic GroovyPrintWriter(java.io.Writer out)
- 
GroovyPrintWriterpublic GroovyPrintWriter(java.io.Writer out, boolean autoflush)
- 
GroovyPrintWriterpublic GroovyPrintWriter(java.io.OutputStream out)
- 
GroovyPrintWriterpublic GroovyPrintWriter(java.io.OutputStream out, boolean autoflush)
- 
GroovyPrintWriterpublic GroovyPrintWriter(java.lang.String filename) throws java.io.FileNotFoundException- Throws:
- java.io.FileNotFoundException
 
- 
GroovyPrintWriterpublic GroovyPrintWriter(java.lang.String filename, java.lang.String csn) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException- Throws:
- java.io.FileNotFoundException
- java.io.UnsupportedEncodingException
 
 
- 
- 
Method Details- 
printpublic void print(java.lang.Object x)- Overrides:
- printin class- java.io.PrintWriter
 
- 
printlnpublic void println(java.lang.Object x)- Overrides:
- printlnin class- java.io.PrintWriter
 
 
-