[ 
https://issues.apache.org/jira/browse/GROOVY-7889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15388874#comment-15388874
 ] 

Paul King commented on GROOVY-7889:
-----------------------------------

You can shorten that slightly with {{newWriter}}. E.g.:
{code}
def ip = new IndentPrinter(new PrintStream(System.out, autoFlush).newWriter())
{code}
There is also (although only slightly shorter than your original) Groovy's 
{{FlushingStreamWriter}}:
{code}
def ip = new IndentPrinter(new FlushingStreamWriter(new 
PrintStream(System.out)))
{code}

> Add autoFlush option to IndentPrinter
> -------------------------------------
>
>                 Key: GROOVY-7889
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7889
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: M. Justin
>            Priority: Minor
>
> It would be convenient for some usage patterns if IndentPrinter had an 
> autoFlush option in the same manner as PrintWriter.  Specifically, if 
> autoFlush were on, any call to either of the println methods would call 
> flush() on the writer.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to