Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.sun.xacml
Class Indenter  view Indenter download Indenter.java

java.lang.Object
  extended bycom.sun.xacml.Indenter

public class Indenter
extends java.lang.Object

Provides flexible indenting for XML encoding. This class generates strings of spaces to be prepended to lines of XML. The strings are formed according to a specified indent width and the given depth.

Since:
1.0

Field Summary
static int DEFAULT_WIDTH
          The default indentation width
private  int depth
           
private  int width
           
 
Constructor Summary
Indenter()
          Constructs an Indenter with the default indent width.
Indenter(int userWidth)
          Constructs an Indenter with a user-supplied indent width.
 
Method Summary
 void in()
          Move in one width.
 java.lang.String makeString()
          Create a String of spaces for indentation based on the current depth.
 void out()
          Move out one width.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_WIDTH

public static final int DEFAULT_WIDTH
The default indentation width

See Also:
Constant Field Values

width

private int width

depth

private int depth
Constructor Detail

Indenter

public Indenter()
Constructs an Indenter with the default indent width.


Indenter

public Indenter(int userWidth)
Constructs an Indenter with a user-supplied indent width.

Method Detail

in

public void in()
Move in one width.


out

public void out()
Move out one width.


makeString

public java.lang.String makeString()
Create a String of spaces for indentation based on the current depth.