Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## groovy.util
Class IndentPrinter

    java.lang.Object
      groovy.util.IndentPrinter

    public class IndentPrinter

extends Object

A helper class for printing indented text.

Version:
  $Revision: 17424 $
Author:
  James Strachan

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(char c)`
`void` | `print(String text)`
`void` | `printIndent()`
`void` | `println()`
`void` | `println(String text)`
`void` | `setIndentLevel(int indentLevel)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### IndentPrinter

    public IndentPrinter()

  Creates a PrintWriter pointing to System.out, with an indent of two spaces.

  See Also:
    `IndentPrinter(PrintWriter, String)`

### IndentPrinter

    public IndentPrinter(PrintWriter out)

  Create an IndentPrinter to the given PrintWriter, with an indent of two spaces.

  Parameters:
    `out` - PrintWriter to output to
  See Also:
    `IndentPrinter(PrintWriter, String)`

### IndentPrinter

    public IndentPrinter(PrintWriter out,
                         String indent)

  Create an IndentPrinter to the given PrintWriter

  Parameters:
    `out` - PrintWriter to output to
    `indent` - character(s) used to indent each line

### IndentPrinter

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

Method Detail

### println

    public void println(String text)

### print

    public void print(String text)

### print

    public void print(char c)

### printIndent

    public void printIndent()

### println

    public void println()

### incrementIndent

    public void incrementIndent()

### decrementIndent

    public void decrementIndent()

### getIndentLevel

    public int getIndentLevel()

### setIndentLevel

    public void setIndentLevel(int indentLevel)

### flush

    public void flush()

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2003-2009 The Codehaus. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD