


If you want to control the writer or stream instances yourself, you can use convenient constructor methods such as newWriter, newOutputStream, newDataOutputStream, Within a closure that allows you to write out primitive and serialized Java types respectively. Io.DataOutputStream and java.io.ObjectOutputStream instances You can also wrap file access using the withDataOutputStream and withObjectOutputStream methods. The stream object will be opened and closed automatically in a similar way to the withWriter method. The leftShift operator is used again to append data to a stream.

Implementing multiple inheritance in Groovy.Defining data structures as code in Groovy.Inheriting constructors in Groovy classes.Writing less verbose Java Beans with Groovy Beans.Searching strings with regular expressions.Generating documentation for Groovy code.Starting groov圜onsole to execute Groovy snippets.Using groovysh to try out Groovy commands.

Managing multiple Groovy installations on Linux.Running Groovy with invokedynamic support.Using Groovy as a command-line text file editor.Executing Groovy code from the command line.
