ca.infoway.messagebuilder.util.text
Class Indenter

Package class diagram package Indenter
java.lang.Object
  extended by ca.infoway.messagebuilder.util.text.Indenter

public class Indenter
extends Object

This class provides basic functionality related to writing out the type of indentation you see in source code.

Author:
Intelliware Development

Constructor Summary
Indenter()
           
 
Method Summary
protected  void indent(int indentLevel, Writer writer)
          Write an indent to a Writer.
static String indent(String string, int indentLevel)
          Write an indent to a string.
static void indentBuffer(StringBuffer buffer, int indentLevel)
          Write an indent to a StringBuffer.
static void indentBuilder(StringBuilder builder, int indentLevel)
          Write an indent to a StringBuilder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Indenter

public Indenter()
Method Detail

indentBuffer

public static void indentBuffer(StringBuffer buffer,
                                int indentLevel)

Write an indent to a StringBuffer.

Parameters:
buffer - - the StringBuffer to which the tabs are written.
indentLevel - - the number of "tabs" to indent

indentBuilder

public static void indentBuilder(StringBuilder builder,
                                 int indentLevel)

Write an indent to a StringBuilder.

Parameters:
builder - - the StringBuilder to which the tabs are written.
indentLevel - - the number of "tabs" to indent

indent

public static String indent(String string,
                            int indentLevel)

Write an indent to a string.

Parameters:
string - - the string to which the tabs are written.
indentLevel - - the number of "tabs" to indent
Returns:
the indented string

indent

protected void indent(int indentLevel,
                      Writer writer)
               throws IOException

Write an indent to a Writer.

Parameters:
indentLevel - - the number of "tabs" to indent
writer - - the Writer to which the tabs are written.
Throws:
IOException


Copyright © 2013. All Rights Reserved.