Package groovy.io
Class GroovyPrintWriter
- java.lang.Object
- 
- java.io.Writer
- 
- java.io.PrintWriter
- 
- groovy.io.GroovyPrintWriter
 
 
 
- 
- All Implemented Interfaces:
- Closeable,- Flushable,- Appendable,- AutoCloseable
 
 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).- Since:
- 1.6
 
- 
- 
Field Summary- 
Fields inherited from class java.io.PrintWriterout
 
- 
 - 
Constructor SummaryConstructors Constructor Description GroovyPrintWriter(File file)GroovyPrintWriter(File file, String csn)GroovyPrintWriter(OutputStream out)GroovyPrintWriter(OutputStream out, boolean autoflush)GroovyPrintWriter(Writer out)GroovyPrintWriter(Writer out, boolean autoflush)GroovyPrintWriter(String filename)GroovyPrintWriter(String filename, String csn)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidprint(Object x)voidprintln(Object x)- 
Methods 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, write
 - 
Methods inherited from class java.io.WriternullWriter
 
- 
 
- 
- 
- 
Constructor Detail- 
GroovyPrintWriterpublic GroovyPrintWriter(File file) throws FileNotFoundException - Throws:
- FileNotFoundException
 
 - 
GroovyPrintWriterpublic GroovyPrintWriter(File file, String csn) throws FileNotFoundException, UnsupportedEncodingException 
 - 
GroovyPrintWriterpublic GroovyPrintWriter(Writer out) 
 - 
GroovyPrintWriterpublic GroovyPrintWriter(Writer out, boolean autoflush) 
 - 
GroovyPrintWriterpublic GroovyPrintWriter(OutputStream out) 
 - 
GroovyPrintWriterpublic GroovyPrintWriter(OutputStream out, boolean autoflush) 
 - 
GroovyPrintWriterpublic GroovyPrintWriter(String filename) throws FileNotFoundException - Throws:
- FileNotFoundException
 
 - 
GroovyPrintWriterpublic GroovyPrintWriter(String filename, String csn) throws FileNotFoundException, UnsupportedEncodingException 
 
- 
 - 
Method Detail- 
printpublic void print(Object x) - Overrides:
- printin class- PrintWriter
 
 - 
printlnpublic void println(Object x) - Overrides:
- printlnin class- PrintWriter
 
 
- 
 
-