Package: groovy.io

## [Java] Class GroovyPrintWriter

- groovy.io.GroovyPrintWriter

- 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).

  Authors:
    Jim White
  Since:
    1.6

- - ### Constructor Summary

    Constructors
    Constructor and description
    `GroovyPrintWriter (File file)`
    `GroovyPrintWriter (File file, String csn)`
    `GroovyPrintWriter (Writer out)`
    `GroovyPrintWriter (Writer out, boolean autoflush)`
    `GroovyPrintWriter (OutputStream out)`
    `GroovyPrintWriter (OutputStream out, boolean autoflush)`
    `GroovyPrintWriter (String filename)`
    `GroovyPrintWriter (String filename, String csn)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `void` | `print(Object x)`
    `` | `void` | `println(Object x)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---

    `class PrintWriter`

    `println, println, println, println, println, println, println, println, println, println, append, append, append, append, append, append, append, append, append, flush, format, format, printf, printf, write, write, write, write, write, print, print, print, print, print, print, print, print, print, close, checkError, nullWriter, equals, toString, hashCode, getClass, notify, notifyAll, wait, wait, wait`

    `class Writer` | `append, append, append, append, append, append, flush, write, write, write, write, write, close, nullWriter, equals, toString, hashCode, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### public GroovyPrintWriter(File file)

    - #### public GroovyPrintWriter(File file, String csn)

    - #### public GroovyPrintWriter(Writer out)

    - #### public GroovyPrintWriter(Writer out, boolean autoflush)

    - #### public GroovyPrintWriter(OutputStream out)

    - #### public GroovyPrintWriter(OutputStream out, boolean autoflush)

    - #### public GroovyPrintWriter(String filename)

    - #### public GroovyPrintWriter(String filename, String csn)

  - ### Method Detail

    - #### public void print(Object x)

    - #### public void println(Object x)