Groovy 1.7.0

## groovy.util
Class IndentPrinter

    java.lang.Object
      groovy.util.IndentPrinter

    class IndentPrinter
    extends Object

A helper class for printing indented text.

author:
  James Strachan

version:
  $Revision: 17424 $

Constructor Summary
`IndentPrinter()` Creates a PrintWriter pointing to System.out, with an indent of two spaces.
`IndentPrinter(PrintWriter out)` Create an IndentPrinter to the given PrintWriter, with an indent of two spaces.
`IndentPrinter(PrintWriter out, String indent)` Create an IndentPrinter to the given PrintWriter
`IndentPrinter(PrintWriter out, String indent, boolean addNewlines)`

Method Summary
`void` | `decrementIndent()`
`void` | `flush()`
`int` | `getIndentLevel()`
`void` | `incrementIndent()`
`void` | `print(String text)`
`void` | `print(char c)`
`void` | `printIndent()`
`void` | `println(String text)`
`void` | `println()`
`void` | `setIndentLevel(int indentLevel)`

Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll

Constructor Detail

### IndentPrinter

    public IndentPrinter()

  Creates a PrintWriter pointing to System.out, with an indent of two spaces.
  see:
    #IndentPrinter(PrintWriter, String)

### IndentPrinter

    public IndentPrinter(PrintWriter out)

  Create an IndentPrinter to the given PrintWriter, with an indent of two spaces.
  param:
    out PrintWriter to output to
  see:
    #IndentPrinter(PrintWriter, String)

### IndentPrinter

    public IndentPrinter(PrintWriter out, String indent)

  Create an IndentPrinter to the given PrintWriter
  param:
    out PrintWriter to output to
  param:
    indent character(s) used to indent each line

### IndentPrinter

    public IndentPrinter(PrintWriter out, String indent, boolean addNewlines)

Method Detail

### decrementIndent

    public void decrementIndent()

### flush

    public void flush()

### getIndentLevel

    public int getIndentLevel()

### incrementIndent

    public void incrementIndent()

### print

    public void print(String text)

### print

    public void print(char c)

### printIndent

    public void printIndent()

### println

    public void println(String text)

  todo:
    temporary hack

### println

    public void println()

### setIndentLevel

    public void setIndentLevel(int indentLevel)

Copyright © 2003-2009 The Codehaus. All rights reserved.